Lean  $LEAN_TAG$
QuantConnect.Report.Crisis Class Reference

Crisis events utility class More...

Public Member Functions

 Crisis (string name, DateTime start, DateTime end)
 Creates a new crisis instance with the given name and start/end date. More...
 
override string ToString ()
 Converts instance to string using the dates in the instance as start/end dates More...
 
string ToString (DateTime start, DateTime end)
 Converts instance to string using the provided dates More...
 

Static Public Member Functions

static Crisis FromCrisis (CrisisEvent crisisEvent)
 Returns a pre-defined crisis event More...
 

Static Public Attributes

static readonly Dictionary< CrisisEvent, CrisisEvents
 Crisis events and pre-defined values More...
 

Properties

DateTime Start [get]
 Start of the crisis event More...
 
DateTime End [get]
 End of the crisis event More...
 
string Name [get]
 Name of the crisis More...
 

Detailed Description

Crisis events utility class

Definition at line 24 of file Crisis.cs.

Constructor & Destructor Documentation

◆ Crisis()

QuantConnect.Report.Crisis.Crisis ( string  name,
DateTime  start,
DateTime  end 
)

Creates a new crisis instance with the given name and start/end date.

Parameters
nameName of the crisis
startStart date of the crisis
endEnd date of the crisis

Definition at line 71 of file Crisis.cs.

Member Function Documentation

◆ FromCrisis()

static Crisis QuantConnect.Report.Crisis.FromCrisis ( CrisisEvent  crisisEvent)
static

Returns a pre-defined crisis event

Parameters
crisisEventCrisis Event
Returns
Pre-defined crisis event

Definition at line 83 of file Crisis.cs.

◆ ToString() [1/2]

override string QuantConnect.Report.Crisis.ToString ( )

Converts instance to string using the dates in the instance as start/end dates

Returns

Definition at line 92 of file Crisis.cs.

◆ ToString() [2/2]

string QuantConnect.Report.Crisis.ToString ( DateTime  start,
DateTime  end 
)

Converts instance to string using the provided dates

Parameters
startStart date
endEnd date
Returns

Definition at line 103 of file Crisis.cs.

Member Data Documentation

◆ Events

readonly Dictionary<CrisisEvent, Crisis> QuantConnect.Report.Crisis.Events
static
Initial value:
= new Dictionary<CrisisEvent, Crisis>
{
{CrisisEvent.DotCom, new Crisis("DotCom Bubble 2000", new DateTime(2000, 2, 26), new DateTime(2000, 9, 10)) },
{CrisisEvent.SeptemberEleventh, new Crisis("September 11, 2001", new DateTime(2001, 9, 5), new DateTime(2001, 10, 10)) },
{CrisisEvent.USHousingBubble2003, new Crisis("U.S. Housing Bubble 2003", new DateTime(2003, 1, 1), new DateTime(2003, 2, 20)) },
{CrisisEvent.GlobalFinancialCrisis, new Crisis("Global Financial Crisis 2007", new DateTime(2007, 10, 1), new DateTime(2011, 12, 1))},
{CrisisEvent.FlashCrash, new Crisis("Flash Crash 2010", new DateTime(2010, 5, 1), new DateTime(2010, 5, 22))},
{CrisisEvent.FukushimaMeltdown, new Crisis("Fukushima Meltdown 2011", new DateTime(2011, 3, 1), new DateTime(2011, 4, 22)) },
{CrisisEvent.USDowngradeEuropeanDebt, new Crisis("U.S. Credit Downgrade 2011", new DateTime(2011, 8, 5), new DateTime(2011, 9, 1))},
{CrisisEvent.EurozoneSeptember2012, new Crisis("ECB IR Event 2012", new DateTime(2012, 9, 5), new DateTime(2012, 10, 12))},
{CrisisEvent.EurozoneOctober2014, new Crisis("European Debt Crisis 2014", new DateTime(2014, 10, 1), new DateTime(2014, 10, 29))},
{CrisisEvent.MarketSellOff2015, new Crisis("Market Sell-Off 2015", new DateTime(2015, 8, 10), new DateTime(2015, 10, 10))},
{CrisisEvent.Recovery, new Crisis("Recovery 2010-2012", new DateTime(2010, 1, 1), new DateTime(2012, 10, 1))},
{CrisisEvent.NewNormal, new Crisis("New Normal 2014-2019", new DateTime(2014, 1, 1), new DateTime(2019, 1, 1))},
{CrisisEvent.COVID19, new Crisis("COVID-19 Pandemic 2020", new DateTime(2020, 2, 10), new DateTime(2020, 9, 20))},
{CrisisEvent.PostCOVIDRunUp, new Crisis("Post-COVID Run-up 2020-2021", new DateTime(2020, 4, 1), new DateTime(2022, 1, 1))},
{CrisisEvent.MemeSeason, new Crisis("Meme Season 2021", new DateTime(2021, 1, 1), new DateTime(2021, 5, 15))},
{CrisisEvent.RussiaInvadesUkraine, new Crisis("Russia Invades Ukraine 2022-2023", new DateTime(2022, 2, 1), new DateTime(2024, 1, 1))},
{CrisisEvent.AIBoom, new Crisis("AI Boom 2022-Present", new DateTime(2022, 11, 30), DateTime.Now)},
}

Crisis events and pre-defined values

Definition at line 29 of file Crisis.cs.

Property Documentation

◆ Start

DateTime QuantConnect.Report.Crisis.Start
get

Start of the crisis event

Definition at line 53 of file Crisis.cs.

◆ End

DateTime QuantConnect.Report.Crisis.End
get

End of the crisis event

Definition at line 58 of file Crisis.cs.

◆ Name

string QuantConnect.Report.Crisis.Name
get

Name of the crisis

Definition at line 63 of file Crisis.cs.


The documentation for this class was generated from the following file: