Analyze historical patterns of the Colombo Stock Exchange during major events and predict market reactions. Use when user asks about "historical patterns", "how did CSE react to", "what happened during COVID", "civil war impact on stocks", "Easter attack market crash", "2022 default crisis", "predict impact of event", "historical analysis", or asks how CSE might react to similar future events based on past behavior from 2009 to 2026.
Type A: Historical Pattern Review User wants to understand how CSE reacted to past events.
Type B: Event Impact Prediction User describes a current/potential event and wants to predict CSE's reaction.
Run:
python main.py history
This provides:
Full historical events database (2009-2026) covering:
Event pattern categories with typical market reactions:
Historical ASPI data from Yahoo Finance (1997-2021) and CSE API (recent)
Run:
python main.py predict-event "description of the event"
This:
| Year | Event | ASPI Impact | Recovery |
|---|---|---|---|
| 2009 | Civil war ends | +125% rally | N/A (positive) |
| 2010 | Market bubble peak | -8% correction | 6 months |
| 2011 | Global commodity spike | -9% | 8 months |
| 2015 | Surprise election result | -5% panic | 3 months |
| 2018 | Constitutional crisis | -6.5% | 4 months |
| 2019 | Easter Sunday attacks | -3.6% immediate | 2 months |
| 2020 | COVID-19 lockdowns | -30% | 9 months |
| 2021 | Import restrictions | -4% | 6 months |
| 2022 | Sovereign default | -40% | Ongoing |
| 2023 | IMF program approval | +25% | N/A (positive) |
| 2024 | Political transition | +8% | N/A (positive) |
| 2025 | Global tariff tensions | -5% | Ongoing |
User says: "How did CSE react during COVID?" Actions:
User says: "If there's a global recession, what happens to CSE?" Actions:
User says: "What if oil prices spike to $150?" Actions: