stoneyl 发表于 2012-6-11 13:19 
Sorry that I cant type Chinese here
I think the algo can be further simplified by setting
B(0) = A ...
Thank you ,infact I come up with a method similar with yours.
All of us forget an problem
What shall we do if the boundary==security price?
I think the boundary should be modified ,so that boundary!=security price