Skip to content

Instantly share code, notes, and snippets.

View charmingLitteDeveloper's full-sized avatar

12313wewe charmingLitteDeveloper

View GitHub Profile
@charmingLitteDeveloper
charmingLitteDeveloper / Readme.md
Created December 30, 2024 04:38 — forked from jongan69/Readme.md
Option Premium Calculator This Python script calculates the total option premiums for a given set of stock options using the Black-Scholes option pricing model. The Black-Scholes model is widely used for estimating the theoretical price of European-style options.

Option Premium Calculator

A Python script using Black-Scholes model to calculate total option premiums for given stock options. Customize with your data and parameters.

Components: Black-Scholes Formula: The calculate_option_premium function implements the Black-Scholes formula, taking into account the current stock price (S), option strike price (K), time to expiration (T), risk-free interest rate (r), and volatility of the underlying asset (sigma). It supports both call and put options.

Black-Scholes Formula

The Black-Scholes formula is a mathematical model used for calculating the theoretical price of European-style options. The formula for the call option is given by:

@charmingLitteDeveloper
charmingLitteDeveloper / main.py
Created August 30, 2023 15:38 — forked from littlecodersh/main.py
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'