00:01
Okay, so the original block shows equation for a non -dividend pain stock is dvdd t plus 1 over 2, sigma squared, s squared, d squared, d squared, plus r s, dv, d, s, plus r s, dv, d, s, minus rv, equals 0.
00:22
Now we can transform to the log space, x equals log of s, and reflect, and reflected time s equals t, minus c so the equation changes derivatives as would be as follows ds equals 1 over s dv d x and then d squared v ds squared equals d d d s 1 over s dv d x squared dv d x squared dv d x squared dv d x plus 1 over s dv d x squared okay, so substituting these into the blackshod's equation, we obtain dvds plus 1 over 2, sigma squared, negative dv, dx plus d squared, d squared, plus r dv, dx minus rv, dx, equals 0.
01:44
And rearranging terms we get dv ds equals 1 over 2 sigma squared dv d x squared plus r minus 1 over 2 sigma squared dv dv d x minus r v okay now so this is the equation and the boundary conditions are v x equals 0 e 2 e to x x minus 50 times 100 minus e to x for e to x between 50 and 100 and also vx equals log 50 s equals v of x equals log 100 s equals 0 as it's worthless outside the interval 50 to 100 it.
02:51
Okay, so let's use python to solve this problem.
02:57
Here i have the script.
02:58
You can review the code later.
03:03
And let's look at the results.
03:04
So this is the plot of v of x0 and v of x1...