[Tutor] urgent help required! invalid syntax

Timo timomlists at gmail.com
Fri Feb 18 10:01:13 CET 2011


On 18-02-11 09:42, lim chee siong wrote:
>
>
> Hi,
>
> I was writing a module for the black-scholes pricing model in python,
> but I keep getting this error message:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "C:\Python26\lib\blackscholes.py", line 25
> d2=d1-v*sqrt(t)
That's not the whole traceback, is it?

>
> This is the code in my blackscholes.py file:
> #Black-Scholes model
>
> [snip]
>
> def dividend(s,x,r,t,v):
> d1=(log(s/x)+((r+v**2/2)*t)/(v*sqrt(t))
> d2=d1-v*sqrt(t)
>
> [snip]
>
>
> What is wrong here? What do I need to change?
Check the line before the line which throws a syntax error. Have a good
look at it and you will see you are missing a character.

Cheers,
Timo

> Thanks! Quick reply will be much appreciated because the deadline is
> tomorrow!
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list