PC-1211, PC-1250, etc. TVM
|
06-01-2024, 03:07 PM
(This post was last modified: 06-01-2024 05:17 PM by Albert Chan.)
Post: #9
|
|||
|
|||
RE: PC-1211, PC-1250, etc. TVM
Hi, robve
Perhaps make rate search true Newton's method? 10 B=1 @ N=40 @ P=900 @ M=-40 @ F=-1000 20 DEF FNF(I) @ S=(1+I)^(-N) @ U=(1-S)/I @ K=1+B*I 25 D=(P+F)/(1-S)*(1-N*S/(1-S+U))+(B*M-F) 30 FNF=(P+F)/U-F*I+K*M @ END DEF ! FNF=NPMT 40 I=.01 @ Y=FNF(I) 50 H=-Y/D @ I=I+H @ Y=FNF(I) ! Newton's method 60 DISP 100*I,Y @ IF I+H*H<>I THEN 50 >run 4.707227645 -.4066650546 4.75336179241 -.0000475552 4.75336718857 0 And time-reversed setup. (barring rounding errors, same FNF(I)) >15 VARSWAP P,F @ P=-P @ F=-F @ N=-N >run 4.70722764501 -.4066650545 4.75336179241 -.0000475552 4.75336718857 0 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)