We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create montecarlo model with 2 x underlyings
val r = t => 0.01 + 0.002 * t val rho = 0.75 val S1 = 100.0 val div1 = t => 0.03 + 0.003 * t val repo1 = t => 0.0 val vol1 = t => 0.25 + 0.01 * t val S2 = 150.0 val div2 = t => 0.05 + 0.003 * t val repo2 = t => 0.0 val vol2 = t => 0.20 + 0.01 * t val cashflow = Map[ 0.5 -> (x:Double, y:Double) => math.max(0.0, math.min(x - 100.0, y - 150.0)), 1.0 -> (x:Double, y:Double) => math.max(0.0, math.min(x - 100.0, y - 150.0)), 1.5 -> (x:Double, y:Double) => math.max(0.0, math.min(x - 100.0, y - 150.0)), 2.0 -> (x:Double, y:Double) => math.max(0.0, math.min(x - 100.0, y - 150.0)), ] price(cashflow) = Map[ 0.5 -> 4.225, 1.0 -> 4.10, 1.5 -> 3.85, 2.0 -> 3.555, ] (or something like this, numbers are complete random)
The text was updated successfully, but these errors were encountered:
MaiSaito
No branches or pull requests
Create montecarlo model with 2 x underlyings
Assumption
Input
Required function
where result is mapping payment date => price
Example
The text was updated successfully, but these errors were encountered: