Lean  $LEAN_TAG$
Greeks.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14 */
15 
16 using QuantConnect.Python;
17 
19 {
20  /// <summary>
21  /// Defines the greeks
22  /// </summary>
23  public abstract class Greeks
24  {
25  /// <summary>
26  /// Gets the delta.
27  /// <para>
28  /// Delta measures the rate of change of the option value with respect to changes in
29  /// the underlying asset'sprice. (∂V/∂S)
30  /// </para>
31  /// </summary>
32  public abstract decimal Delta { get; }
33 
34  /// <summary>
35  /// Gets the gamma.
36  /// <para>
37  /// Gamma measures the rate of change of Delta with respect to changes in
38  /// the underlying asset'sprice. (∂²V/∂S²)
39  /// </para>
40  /// </summary>
41  public abstract decimal Gamma { get; }
42 
43  /// <summary>
44  /// Gets the vega.
45  /// <para>
46  /// Vega measures the rate of change of the option value with respect to changes in
47  /// the underlying's volatility. (∂V/∂σ)
48  /// </para>
49  /// </summary>
50  public abstract decimal Vega { get; }
51 
52  /// <summary>
53  /// Gets the theta.
54  /// <para>
55  /// Theta measures the rate of change of the option value with respect to changes in
56  /// time. This is commonly known as the 'time decay.' (∂V/∂τ)
57  /// </para>
58  /// </summary>
59  public abstract decimal Theta { get; }
60 
61  /// <summary>
62  /// Gets the rho.
63  /// <para>
64  /// Rho measures the rate of change of the option value with respect to changes in
65  /// the risk free interest rate. (∂V/∂r)
66  /// </para>
67  /// </summary>
68  public abstract decimal Rho { get; }
69 
70  /// <summary>
71  /// Gets the lambda.
72  /// <para>
73  /// Lambda is the percentage change in option value per percentage change in the
74  /// underlying's price, a measure of leverage. Sometimes referred to as gearing.
75  /// (∂V/∂S ✕ S/V)
76  /// </para>
77  /// </summary>
78  [PandasIgnore]
79  public abstract decimal Lambda { get; }
80 
81  /// <summary>
82  /// Gets the lambda.
83  /// <para>
84  /// Lambda is the percentage change in option value per percentage change in the
85  /// underlying's price, a measure of leverage. Sometimes referred to as gearing.
86  /// (∂V/∂S ✕ S/V)
87  /// </para>
88  /// </summary>
89  /// <remarks>
90  /// Alias for <see cref="Lambda"/> required for compatibility with Python when
91  /// PEP8 API is used (lambda is a reserved keyword in Python).
92  /// </remarks>
93  [PandasIgnore]
94  public virtual decimal Lambda_ => Lambda;
95 
96  /// <summary>
97  /// Gets the theta per day.
98  /// <para>
99  /// Theta measures the rate of change of the option value with respect to changes in
100  /// time. This is commonly known as the 'time decay.' (∂V/∂τ)
101  /// </para>
102  /// </summary>
103  [PandasIgnore]
104  public virtual decimal ThetaPerDay => Theta / 365m;
105  }
106 }