Archive for the ‘finance’ Category
Wednesday, November 16th, 2011
I wanted to plot the paths of my Monte Carlo simulation of Black Scholes in my previous post.
Using iPython started with the --pylab flag, it's pretty easy.
[sourcecode language=Python]
from math import exp
from random import gauss
St0=41.75
rate=.0535
vol=.34
trials=100
for trials in range(trials):
prices=[St0]
for day in range(time):
...
Posted in finance, programming | No Comments »
Wednesday, November 16th, 2011
The Black Scholes formula is a partial differential equation that can be used to price the present value of an option under certain assumptions. As with everything, you can read all about it in Wikipedia.
It turns that that figuring out the present value of an option is also a ...
Posted in finance, mathematics, programming | 1 Comment »
Sunday, June 8th, 2008
A yield curve is a representation of what interest rates you could lock in today for investments over different periods. It's effectively a set of yields for securities of different maturities (typically cash rates at the short end, futures and then swaps at the longer maturities - see the ...
Posted in finance | 2 Comments »
Sunday, June 8th, 2008
One of the (many) aspects of the "Mathematical Constant" [tex]e[/tex] is that:
[tex]\lim_{x\to\infty} (1+\frac{1}{x})^x = e[/tex]
This property makes [tex]e[/tex] very useful for working on compounding interest problems. How so?
Let's start with the basic time value of money formula giving the relationship between the PV (present value) and FV (future value) given R (the ...
Posted in finance | No Comments »