Difference between revisions of "Calloption"

(Created page and initial function documentation)
Line 5: Line 5:
  
 
; Example
 
; Example
  Calloption(50,50,0.25,0.05,0.3) ==> 3.292
+
  Calloption(50,50,0.25,0.05,0.3) → 3.292
  
 
; Expects: '''s''', '''x''', '''t''', '''r''', and '''theta''' all as numeric.
 
; Expects: '''s''', '''x''', '''t''', '''r''', and '''theta''' all as numeric.
  
; Parameters: '''s''' is the price of the security now;<br>'''s''' is the exercise price;<br>'''t''' is the time in years to exercise;<br>'''r''' is the risk-free interest rate;<br> and '''theta''' is the volatility of the security.
+
; Parameters: '''s''' is the price of the security now;<br>'''s''' is the exercise price;<br>'''t''' is the time in years to exercise;<br>'''r''' is the risk-free interest rate;<br>'''theta''' is the volatility of the security.
 
; Function definition: USING d1 := (ln(s/x) + t * (r+ (0.5 * theta^2))) / (theta * t^0.5)<br>DO s * Cumnormal(d1) - (x * exp(-r * t) * Cumnormal(d1 - (theta * t^0.5)))
 
; Function definition: USING d1 := (ln(s/x) + t * (r+ (0.5 * theta^2))) / (theta * t^0.5)<br>DO s * Cumnormal(d1) - (x * exp(-r * t) * Cumnormal(d1 - (theta * t^0.5)))
  

Revision as of 19:33, 25 June 2007


Function Calloption(s,x,t,r,theta)

Calculates the value of a call option using the Black-Scholes formula.

Example
Calloption(50,50,0.25,0.05,0.3) → 3.292
Expects
s, x, t, r, and theta all as numeric.
Parameters
s is the price of the security now;
s is the exercise price;
t is the time in years to exercise;
r is the risk-free interest rate;
theta is the volatility of the security.
Function definition
USING d1 := (ln(s/x) + t * (r+ (0.5 * theta^2))) / (theta * t^0.5)
DO s * Cumnormal(d1) - (x * exp(-r * t) * Cumnormal(d1 - (theta * t^0.5)))
Syntax
Calloption(s,x,t,r,theta : Numeric)
Library
Financial functions
More Examples and Tips
None yet.
Comments


You are not allowed to post comments.