나는 미래의 다양한 시간에 짧은 전화의 이익/손실을 계산하려고 시도하고 있지만 올바른 것은 아닙니다. 만료 시점과 비교해 볼 때, 시간이 남은 기업은 파업 가격보다 적은 이익을 가지지 만 파업 아래 어느 시점에서는 t = 0 선만큼 빨리 가치를 잃지 않습니다. 아래는 의사 코드의 수식입니다. 내가 뭘 잘못하고 있니?Black-Scholes 공식으로 간단한 옵션 호출의 가치를 계산하는 방법은 무엇입니까?
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
함수 optstockbybls는 matlab 도구 상자의 일부입니다. – CptanPanic
나는 그것이 MATLAB보다는 당신의 코드에 오류라고 가정하고 싶다. 당신의 물건을 더 조심스럽게보고, 좋은 사례 세트를 얻으십시오. – duffymo
다음은 블랙 숄즈 계산기 http://www.seleno.us/options.php입니다. 이거 한번 해봐. – JTHouseCat