Lean  $LEAN_TAG$
FutureExpirationCycles.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 
17 {
18  /// <summary>
19  /// Static class contains definitions of popular futures expiration cycles
20  /// </summary>
21  public static class FutureExpirationCycles
22  {
23  /// <summary>
24  /// January Cycle: Expirations in January, April, July, October (the first month of each quarter)
25  /// </summary>
26  public static readonly int[] January = { 1, 4, 7, 10 };
27 
28  /// <summary>
29  /// February Cycle: Expirations in February, May, August, November (second month)
30  /// </summary>
31  public static readonly int[] February = { 2, 5, 8, 11 };
32 
33  /// <summary>
34  /// March Cycle: Expirations in March, June, September, December (third month)
35  /// </summary>
36  public static readonly int[] March = { 3, 6, 9, 12 };
37 
38  /// <summary>
39  /// December Cycle: Expirations in December
40  /// </summary>
41  public static readonly int[] December = { 12 };
42 
43  /// <summary>
44  /// All Year Cycle: Expirations in every month of the year
45  /// </summary>
46  public static readonly int[] AllYear = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
47 
48  /// <summary>
49  /// GJMQVZ Cycle
50  /// </summary>
51  public static readonly int[] GJMQVZ = { 2, 4, 6, 8, 10, 12 };
52 
53  /// <summary>
54  /// GJKMNQVZ Cycle
55  /// </summary>
56  public static readonly int[] GJKMNQVZ = { 2, 4, 5, 6, 7, 8, 10, 12 };
57 
58  /// <summary>
59  /// HMUZ Cycle
60  /// </summary>
61  public static readonly int[] HMUZ = March;
62 
63  /// <summary>
64  /// HKNUZ Cycle
65  /// </summary>
66  public static readonly int[] HKNUZ = { 3, 5, 7, 9, 12 };
67 
68  /// <summary>
69  /// HKNV Cycle
70  /// </summary>
71  public static readonly int[] HKNV = { 3, 5, 7, 10 };
72 
73  /// <summary>
74  /// HKNVZ Cycle
75  /// </summary>
76  public static readonly int[] HKNVZ = { 3, 5, 7, 10, 12 };
77 
78  /// <summary>
79  /// FHKNUX Cycle
80  /// </summary>
81  public static readonly int[] FHKNUX = { 1, 3, 5, 7, 9, 11 };
82 
83  /// <summary>
84  /// FHJKQUVX Cycle
85  /// </summary>
86  public static readonly int[] FHJKQUVX = { 1, 3, 4, 5, 8, 9, 10, 11 };
87 
88  /// <summary>
89  /// HKNUVZ Cycle
90  /// </summary>
91  public static readonly int[] HKNUVZ = { 3, 5, 7, 9, 10, 12 };
92 
93  /// <summary>
94  /// FHKNQUVZ Cycle
95  /// </summary>
96  public static readonly int[] FHKNUVZ = { 1, 3, 5, 7, 9, 10, 12 };
97 
98  /// <summary>
99  /// FHKMQUVZ Cycle
100  /// </summary>
101  public static readonly int[] FHKNQUVZ = { 1, 3, 5, 7, 8, 9, 10, 12 };
102 
103  /// <summary>
104  /// FHKNQUX Cycle
105  /// </summary>
106  public static readonly int[] FHKNQUX = { 1, 3, 5, 7, 8, 9, 11 };
107 
108  /// <summary>
109  /// FGHJKMNQUVXZ Cycle
110  /// </summary>
111  public static readonly int[] FGHJKMNQUVXZ = AllYear;
112  }
113 }