-
Notifications
You must be signed in to change notification settings - Fork 0
Database
Constantin edited this page Jun 13, 2025
·
11 revisions
Metis uses a SQLite database stored in the file data.db.
PK: Primary Key
AI: Auto-increment
UN: Unique
NN: Not Null
| Table name | Field name | Type | PK | AI | UN | NN | Description |
|---|---|---|---|---|---|---|---|
| market_data | timestamp | TEXT | ✅ | ❌ | ❌ | ❌ | Timestamp of data in format: "YYYY-MM-DD HH:MM:SS+00:00". The data will always be GMT+00 |
| symbol | TEXT | ✅ | ❌ | ❌ | ❌ | Symbol in yfinance format, for example "AAPL" for Apple or "^GSPC" for S&P500 | |
| open | REAL | ❌ | ❌ | ❌ | ❌ | A float value denoting the opening price | |
| high | REAL | ❌ | ❌ | ❌ | ❌ | A float value denoting the highest price during the time period | |
| low | REAL | ❌ | ❌ | ❌ | ❌ | A float value denoting the lowest price during the time period | |
| close | REAL | ❌ | ❌ | ❌ | ❌ | A float value denoting the close price | |
| volume | INTEGER | ❌ | ❌ | ❌ | ❌ | An integer value denoting trading volume during the time period | |
| backtest_results | start_timestamp | TEXT | ✅ | ❌ | ❌ | ✅ | Start of simulation in format:"YYYY-MM-DD HH:MM:SS+00:00". The data will always be GMT+00 |
| end_timestamp | TEXT | ✅ | ❌ | ❌ | ✅ | End of simulation in format: "YYYY-MM-DD HH:MM:SS+00:00". The data will always be GMT+00 | |
| symbol | TEXT | ✅ | ❌ | ❌ | ✅ | Symbol in yfinance format, for example "AAPL" for Apple or "^GSPC" for S&P500 | |
| interval | TEXT | ❌ | ❌ | ❌ | Interval in yfinance format, for example "1d" for daily or "1h" for hourly. Influences the format start and end timestamps. | ||
| decisions | TEXT | ❌ | ❌ | ❌ | Stores the decisions the strategy made in a NOT YET DEFINED format | ||
| revenue | REAL | ❌ | ❌ | ❌ | Float value of total revenue the stratgy made. Can be negative if the strategy lost money. | ||
| start_capital | REAL | ❌ | ❌ | ❌ | The capital that the strategy could invest in the beginning. | ||
| strategy | TEXT | ✅ | ❌ | ❌ | ✅ | The name of the strategy. |