Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiachen01 authored Jan 8, 2025
1 parent 5c6a537 commit 6f1b4f7
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ Data Source: Benzinga Time-Series Data

**Features:** MACD, MACD-Hist, RSI, SlowK, SlowD <br>

> [!NOTE]
**We choose a classification approach. Why?** <br>
Trading decisions are categorical: you either buy, sell, or hold. Since we want an approach that is (1) easy to interpret and (2) quick to implement (for quicker testing and given limited timeframe), classification was the way to go! <br><br> Perfect for high frequency trading! ✨
Trading decisions are categorical: you either buy, sell, or hold. Since we want an approach that is (1) easy to interpret and (2) quick to implement (for quicker testing and given limited timeframe), classification was the way to go.

Perfect for high frequency trading! ✨

---
**Method:** Create a label called “signal” that represents whether we should buy or sell a stock based on its price over the next 2 days
Expand All @@ -47,11 +50,29 @@ Trading decisions are categorical: you either buy, sell, or hold. Since we want
- **Threshold_weak** = 3%
- **Min_diff** = 1%

---

## Signal Sample of NVDA
Here’s a glimpse of our algorithm applied to approximately 180 days of NVDA data:
![nvda](https://github.com/user-attachments/assets/3bb16aa9-dcc1-4daf-b1d4-e4dc3017dbb6)


## Model Selection
| Model | Reasoning |
| ----- | ------ |
| Random Forest Classifer (RF) | • Less prone to overfitting due to using multiple decision trees instead of one <br> • Resistant to noise and outliers |
| Gradient Boosting Classifer (GB) | • Tends to achieve higher accuracy compared to Random Forest <br> • Excellant capturing complex relationships between features and the target variable |

**Hyperparameter Tuning**
>[!WARNING]
> There was an error in how we configured and ran RandomizedSearchCV, which affected the hyperparameter sampling process. As a result, the reported results may be skewed and should not be considered fully reliable. We recommend rerunning the search with corrected parameters to ensure accuracy.
| Tuning Method | Accuracy Score |
| ----- | ------ |
| RF - None | **0.67** |
| RF - GridSearchCV | 0.54 |
| RF - RandomizedSearchCV | 0.54 |
| GB - None | 0.55 |
| GB - GridSearchCV | 0.60 |
| GB - RandomizedSearchCV | 0.59 |

## NoSQL Database
Since our dataset updates daily, we used MongoDB to store our data on the cloud (better accessibility ✅) The database was organized into 3 categorical collections:
Expand All @@ -65,15 +86,15 @@ Since our dataset updates daily, we used MongoDB to store our data on the cloud
├── Market Logs/
```

**Historical Data:** Stores historical stock data for the last 6 months, with 5-minute candlestick intervals (this is what the model is trained on)
- **Historical Data:** Stores historical stock data for the last 6 months, with 5-minute candlestick intervals (this is what the model is trained on)

**EMA-78 Data:** Stores 78 rows of past data needed to compute the technical indictator during real-time excutation
- **EMA-78 Data:** Stores 78 rows of past data needed to compute the technical indictator during real-time excutation

**Market Logs:** Stores logs of model executation (buy or sell). The schema is as follows:
- Timestamp
- Trade Type
- Monetary Metrics (e.g., trader’s funds and stock prices)
- Volume
- **Market Logs:** Stores logs of model executation (buy or sell). The schema is as follows:
- Timestamp
- Trade Type
- Monetary Metrics (e.g., trader’s funds and stock prices)
- Volume


## Installing Dependencies
Expand All @@ -91,6 +112,6 @@ To install the necessary dependencies for this project, follow these steps:
```

## Credits and Acknowledgements
Special thanks to Swathi Senthil, George Abu Daoud, Bharath Venkataraman, and Boshen Parthasarathy for the feedback and mentorship.
Special thanks to Swathi Senthil, George Abu Daoud, Bharath Venkataraman, and Boshen Parthasarathy for the mentorship and feedback.

**Tools/Libraries:** Google Colab, VSCode, Scikit-learn, MongoDB, Benzinga

0 comments on commit 6f1b4f7

Please sign in to comment.