Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我试图在将来的不同时间计算空头头寸的盈亏,但是这种说法并不正确。与到期时间相比,剩余时间的那些在执行价格之上的利润较少,但是在执行价格之下的某个时刻,它们的价值损失没有t = 0线那么快。以下是伪代码中的公式,我在做什么错?
profit(stockprice) = -1 * (black_scholes_price_of_call(stockPrice,optionStrike,daysTillExpiration) - premium); 真实的matlab代码: function [ x ] = sell_call( current,strike,price,days) if (days > 0) Sigma = .25; Rates = 0.05; Settle = today; Maturity = today + days; RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, 'EndDates',... Maturity, 'Rates', Rates, 'Compounding', -1); StockSpec = stockspec(Sigma, current); x = -1 * (optstockbybls(RateSpec, StockSpec, Settle, Maturity, 'call', strike) - price); else x = min(price,strike-current-price); end 结束 谢谢,CP 回答: 我发现了问题,这与RateSpec参数有关。当您传递利率时,它将影响期权定价。 更多&回答... |
![]() |
![]() |