kyos/options-calculator
最新稳定版本:1.0.2
Composer 安装命令:
composer require kyos/options-calculator
包简介
A collection of methods to calculate option prices, greeks & implied volatilities
README 文档
README
Option Valuation Calculator
A collection of methods to calculate option prices, greeks & implied volatilities.
Range of supported products:
- European options on futures, using the Black'76 methodology.
Range of supported methodologies to derive implied volatilities:
- Bisection search algorithm.
Installation
You can install the package via composer:
composer require kyos/options-calculator
Usage
use Kyos\OptionsCalculator\Black76; $bs = new Black76(); echo $bs->getValues(Black76::CALL, 10.5, 12, 0.082, 0.60); // [ // 'value' => 0.2405826183655344, // 'delta' => 0.24449431791580983, // 'gamma' => 0.17399585222314845, // 'vega' => 0.009438057012140243, // 'theta' => -3.450541861184725, // 'rho' => -0.00019727774705973822, // ] echo $bs->getValues(Black76::PUT, 10.5, 12, 0.082, 0.60); // [ // 'value' => 1.7393531225277215, // 'delta' => -0.7546860181923143, // 'gamma' => 0.17399585222314845, // 'vega' => 0.009438057012140243, // 'theta' => -3.435554156143103, // 'rho' => -0.0014262695604727318, // ] echo $bs->getImpliedVolatility(Black76::CALL, 10.5, 12, 0.082, 0.2405826183655344); // 0.60 echo $bs->getImpliedVolatility(Black76::PUT, 10.5, 12, 0.082, 1.7393531225277215); // 0.60
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 245.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-13
