Skip to content

Instantly share code, notes, and snippets.

@jace48
jace48 / OptionPremium_WithGreeks.py
Last active August 30, 2024 19:20
Black Scholes Merton with Greeks (Adjoints) with respect to Inputs
import math
from scipy.stats import norm
def BSM_withAdjoints(S0, r, y, sig, K, T):
#Evaluation
sqrtT = math.sqrt(T)
df = math.exp(-r * T)
@jace48
jace48 / GetIVGreeks.py
Last active February 20, 2024 05:58 — forked from ShabbirHasan1/GetIVGreeks.py
Python Class To Calculate Options IV and Greeks
# -*- coding: utf-8 -*-
"""
:description: Python Class To Calculate Options IV and Greeks
:license: MIT.
:author: Shabbir Hasan
:created: On Thursday December 22, 2022 23:43:57 GMT+05:30
"""
__author__ = "Shabbir Hasan aka DrJuneMoone"
__webpage__ = "https://github.com/ShabbirHasan1"
__license__ = "MIT"
@jace48
jace48 / SMA_EMA_250.py
Last active July 13, 2024 14:57
EMA and SMA of Stock with Rolling days of 250
import numpy as np
from datetime import datetime
import pandas as pd
import plotly.graph_objs as go
'''
Sample CSV File
Ticker,Date,Open,High,Low,Close,Volume
SBIN,2024-04-24,778.50,778.50,770.20,773.10,7842615