-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
69 lines (64 loc) · 2.47 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @param strike - strike price ($$$ per share)
* @param stock - underlying price ($$$ per share)
* @param interestRate - continuously compounded risk-free interest rate (% p.a.)
* @param volatility - (% p.a.)
* @param timeToExpire - time to expiration (% of year)
* @param dividend - continuously compounded dividend yield (% p.a.)
*/
type BlackScholesInput = {
strike: number,
stock: number,
interestRate: number,
volatility: number,
timeToExpire: number
dividend?: number,
}
/**
* @param strike - strike price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*
* @returns Price in the underlying asset at which exercise/dispose of the contract without incurring a loss
*/
export function callBreakEvenPoint(strike: number, premium?: number): number;
/**
* @param strike - strike price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*
* @returns Price in the underlying asset at which exercise/dispose of the contract without incurring a loss
*/
export function putBreakEvenPoint(strike: number, premium?: number): number;
/**
* @param strike - strike price ($$$ per share)
* @param stock - underlying price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*/
export function payoffFromBuyingCall(strike: number, stock: number, premium?: number): number;
/**
* @param strike - strike price ($$$ per share)
* @param stock - underlying price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*/
export function payoffFromBuyingPut(strike: number, stock: number, premium?: number): number;
/**
* @param strike - strike price ($$$ per share)
* @param stock - underlying price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*/
export function payoffFromSellingCall(strike: number, stock: number, premium?: number): number;
/**
* @param strike - strike price ($$$ per share)
* @param stock - underlying price ($$$ per share)
* @param premium - current market price of an option ($$$ per share)
*/
export function payoffFromSellingPut(strike: number, stock: number, premium: number): number;
/**
* @param blackScholesInput
* @returns price of `call` option
*/
export function callPrice(blackScholesInput: BlackScholesInput): number;
/**
* @param blackScholesInput
* @returns price of `put` option
*/
export function putPrice(blackScholesInput: BlackScholesInput): number;