Calculates the theoretical partials, or greeks for a put option.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public OptionPartials GetAmericanPutPartials( double assetPrice, double strikePrice, int expirationMonth, int expirationYear ) |
| Visual Basic (Declaration) |
|---|
Public Function GetAmericanPutPartials ( _ assetPrice As Double, _ strikePrice As Double, _ expirationMonth As Integer, _ expirationYear As Integer _ ) As OptionPartials |
| Visual C++ |
|---|
public: OptionPartials GetAmericanPutPartials( double assetPrice, double strikePrice, int expirationMonth, int expirationYear ) |
Parameters
- assetPrice
- Type: System..::.Double
current price of the underlying asset.
- strikePrice
- Type: System..::.Double
strike price of the option.
- expirationMonth
- Type: System..::.Int32
expiration month of the option.
- expirationYear
- Type: System..::.Int32
expiration year of the option.
Return Value
On success returns an OptionPartials structure with partials calculated
Remarks
Partials or "greeks" measure sensitivities of an option's value to certain variables and are mostly used for hedging purposes
Examples
Get a put option's delta value(C#)
CopyC#
// Retrieve the current historical volatility based on an already created instance of the historical volatility indicator. ISeries hvSeries = Indicators["HV"][symbol]; double hvValue = hvSeries[hvSeries.Count - 1]; // Create an OptionCalculator instance with the historical volatility value OptionCalculator optionCalc = new OptionCalculator(hvValue); Get the partials for the 38.00 strike price option expiring in December of 2006 OptionPartials partials = optionCalc.GetAmericanPutPartials(bar.Close, 38.00, 12, 2006); // Display the delta value in a message box. MessageBox.Show(partials.Delta.ToString());