Documentation
¶
Index ¶
- func CND(x float64) float64
- func PD(x float64) float64
- type BlackScholes
- func (b *BlackScholes) Delta(sigma float64) float64
- func (b *BlackScholes) Gamma(sigma float64) float64
- func (b *BlackScholes) Greeks() *Greeks
- func (b *BlackScholes) IV() float64
- func (b *BlackScholes) Price(sigma float64) float64
- func (b *BlackScholes) Rho(sigma float64) float64
- func (b *BlackScholes) Theta(sigma float64) float64
- func (b *BlackScholes) Vega(sigma float64) float64
- type Greeks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlackScholes ¶
type BlackScholes struct {
DerivativePrice float64 // The price of the option.
UnderlyingPrice float64 // The price of the underlying asset.
StrikePrice float64 // The strike price.
TimeToMaturity float64 // The annualized time to expiration. Must be positive.
RiskRate float64 // The Interest Free Rate.
Dividend float64 // The annualized continuous dividend yield.
IsCall bool // For each contract, this should be specified as tru for a call option and false for a put option.
}
func (*BlackScholes) Delta ¶
func (b *BlackScholes) Delta(sigma float64) float64
Delta Calculate Delta
func (*BlackScholes) Gamma ¶
func (b *BlackScholes) Gamma(sigma float64) float64
Gamma Calculate Gamma
func (*BlackScholes) Greeks ¶
func (b *BlackScholes) Greeks() *Greeks
func (*BlackScholes) IV ¶
func (b *BlackScholes) IV() float64
IV Implied Volatility calculation using Newton-Raphson method
func (*BlackScholes) Price ¶
func (b *BlackScholes) Price(sigma float64) float64
func (*BlackScholes) Theta ¶
func (b *BlackScholes) Theta(sigma float64) float64
Theta Calculate Theta
Click to show internal directories.
Click to hide internal directories.