- UID
- 2
- 积分
- 2874674
- 威望
- 1387366 布
- 龙e币
- 1487308 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【BjerkStensCall】
- inputs:
- AssetPr( numericsimple ),
- StrikePr( numericsimple ),
- YearsLeft( numericsimple ),
- Rate( numericsimple ),
- Carry( numericsimple ),
- Volty( numericsimple ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ),
- var3( 0 ),
- var4( 0 ),
- var5( 0 ),
- var6( 0 ) ;
-
- if Carry < Rate then
- begin
- var0 = Square( Volty ) ;
- var1 = .5 - Carry / var0 + SquareRoot( Square( Carry / var0 - .5 )
- + 2 * Rate / var0 ) ;
- var2 = ( var1 / ( var1 - 1 ) ) * StrikePr ;
- var3 = MaxList( StrikePr, ( Rate / ( Rate - Carry ) ) * StrikePr ) ;
- var4 = -( Carry * YearsLeft + 2 * Volty * Square( YearsLeft ) ) * var3
- / ( var2 - var3 ) ;
- var5 = var3 + ( var2 - var3 ) * ( 1 - ExpValue( var4 ) ) ;
- var6 = ( var5 - StrikePr ) * Power( var5, - var1 ) ;
- if AssetPr >= var5 then
- BjerkStensCall = AssetPr - StrikePr
- else
- BjerkStensCall = var6 * Power( AssetPr, var1 )- var6
- * BjerkStensPhi(
- AssetPr, YearsLeft, var1, var5, var5, Rate, Carry, Volty )
- + BjerkStensPhi(
- AssetPr, YearsLeft, 1, var5, var5, Rate, Carry, Volty )
- - BjerkStensPhi(
- AssetPr, YearsLeft, 1, StrikePr, var5, Rate, Carry, Volty )- StrikePr
- * BjerkStensPhi(
- AssetPr, YearsLeft, 0, var5, var5, Rate, Carry, Volty ) + StrikePr
- * BjerkStensPhi(
- AssetPr, YearsLeft, 0, StrikePr, var5, Rate, Carry, Volty ) ;
- end
- else
- BjerkStensCall = 0 ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|