This Gist was automatically created by Carbide, a free online programming environment.
Last active
December 29, 2016 18:23
-
-
Save alexchinco/a82f82236999be4337562310357d63ad to your computer and use it in GitHub Desktop.
Calculating state prices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = 0.05; | |
var R_f = 0.02; | |
var V_U = 900; | |
var V_D = 700; | |
var P_0 = 800; | |
var P_U = ((1 + R) * P_0 - V_D)/(V_U - V_D); | |
var P_D = 1 - P_U; | |
var S_U = (P_0 - V_D/(1 + R_f))/(V_U - V_D); | |
var S_D = (V_U/(1 + R_f) - P_0)/(V_U - V_D); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment