Upload 46 files
Browse files- 2023-12-15_2024-6-20/Screenshot 2024-06-30 223105.png +0 -0
- 2023-12-15_2024-6-20/Tearsheet (generated by QuantStats).pdf +0 -0
- 2024-06-30_21-07-34/Screenshot 2024-06-30 222548.png +0 -0
- 2024-06-30_21-07-34/Screenshot 2024-06-30 222824.png +0 -0
- 2024-06-30_21-07-34/Screenshot 2024-06-30 222838.png +0 -0
- 2024-06-30_21-07-34/Screenshot 2024-06-30 222858.png +0 -0
- 2024-06-30_21-07-34/Tearsheet (generated by QuantStats).pdf +0 -0
- 2024-06-30_21-07-34/Tearsheet-2.pdf +0 -0
- 2024-06-30_21-07-34/Tearsheet-3.pdf +0 -0
- 2024-06-30_21-07-34/Tearsheet-4.pdf +0 -0
- __pycache__/finbert_utils.cpython-310.pyc +0 -0
- finbert_utils.py +29 -0
- logs/MLTrader_2024-06-30_21-07-29_logs.csv +98 -0
- logs/MLTrader_2024-06-30_21-07-29_stats.csv +14 -0
- logs/MLTrader_2024-06-30_21-07-34_settings.json +1 -0
- logs/MLTrader_2024-06-30_21-07-34_tearsheet.html +0 -0
- logs/MLTrader_2024-06-30_21-07-34_trades.csv +3 -0
- logs/MLTrader_2024-06-30_21-07-34_trades.html +0 -0
- logs/MLTrader_2024-06-30_21-18-56_logs.csv +276 -0
- logs/MLTrader_2024-06-30_21-18-56_stats.csv +14 -0
- logs/MLTrader_2024-06-30_21-18-59_settings.json +1 -0
- logs/MLTrader_2024-06-30_21-18-59_tearsheet.html +0 -0
- logs/MLTrader_2024-06-30_21-18-59_trades.csv +3 -0
- logs/MLTrader_2024-06-30_21-18-59_trades.html +0 -0
- logs/MLTrader_2024-06-30_21-48-04_logs.csv +276 -0
- logs/MLTrader_2024-06-30_21-48-04_stats.csv +14 -0
- logs/MLTrader_2024-06-30_21-48-09_settings.json +1 -0
- logs/MLTrader_2024-06-30_21-48-09_tearsheet.html +0 -0
- logs/MLTrader_2024-06-30_21-48-09_trades.csv +3 -0
- logs/MLTrader_2024-06-30_21-48-09_trades.html +0 -0
- logs/MLTrader_2024-06-30_22-02-42_logs.csv +276 -0
- logs/MLTrader_2024-06-30_22-02-42_stats.csv +14 -0
- logs/MLTrader_2024-06-30_22-02-48_settings.json +1 -0
- logs/MLTrader_2024-06-30_22-02-48_tearsheet.html +0 -0
- logs/MLTrader_2024-06-30_22-02-48_trades.csv +3 -0
- logs/MLTrader_2024-06-30_22-02-48_trades.html +0 -0
- logs/MLTrader_2024-06-30_22-13-35_logs.csv +78 -0
- logs/MLTrader_2024-06-30_22-13-35_stats.csv +7 -0
- logs/MLTrader_2024-06-30_22-13-45_settings.json +1 -0
- logs/MLTrader_2024-06-30_22-16-50_logs.csv +0 -0
- logs/MLTrader_2024-06-30_22-16-50_stats.csv +156 -0
- logs/MLTrader_2024-06-30_22-19-03_settings.json +1 -0
- logs/MLTrader_2024-06-30_22-19-03_tearsheet.html +0 -0
- logs/MLTrader_2024-06-30_22-19-03_trades.csv +29 -0
- logs/MLTrader_2024-06-30_22-19-03_trades.html +0 -0
- tradingbot.py +99 -0
2023-12-15_2024-6-20/Screenshot 2024-06-30 223105.png
ADDED
![]() |
2023-12-15_2024-6-20/Tearsheet (generated by QuantStats).pdf
ADDED
Binary file (356 kB). View file
|
|
2024-06-30_21-07-34/Screenshot 2024-06-30 222548.png
ADDED
![]() |
2024-06-30_21-07-34/Screenshot 2024-06-30 222824.png
ADDED
![]() |
2024-06-30_21-07-34/Screenshot 2024-06-30 222838.png
ADDED
![]() |
2024-06-30_21-07-34/Screenshot 2024-06-30 222858.png
ADDED
![]() |
2024-06-30_21-07-34/Tearsheet (generated by QuantStats).pdf
ADDED
Binary file (339 kB). View file
|
|
2024-06-30_21-07-34/Tearsheet-2.pdf
ADDED
Binary file (339 kB). View file
|
|
2024-06-30_21-07-34/Tearsheet-3.pdf
ADDED
Binary file (339 kB). View file
|
|
2024-06-30_21-07-34/Tearsheet-4.pdf
ADDED
Binary file (339 kB). View file
|
|
__pycache__/finbert_utils.cpython-310.pyc
ADDED
Binary file (1.08 kB). View file
|
|
finbert_utils.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
3 |
+
import torch
|
4 |
+
from typing import Tuple
|
5 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
6 |
+
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("ProsusAI/finbert")
|
8 |
+
model = AutoModelForSequenceClassification.from_pretrained("ProsusAI/finbert").to(device)
|
9 |
+
labels = ["positive", "negative", "neutral"]
|
10 |
+
|
11 |
+
def estimate_sentiment(news):
|
12 |
+
if news:
|
13 |
+
tokens = tokenizer(news, return_tensors="pt", padding=True).to(device)
|
14 |
+
|
15 |
+
result = model(tokens["input_ids"], attention_mask=tokens["attention_mask"])[
|
16 |
+
"logits"
|
17 |
+
]
|
18 |
+
result = torch.nn.functional.softmax(torch.sum(result, 0), dim=-1)
|
19 |
+
probability = result[torch.argmax(result)]
|
20 |
+
sentiment = labels[torch.argmax(result)]
|
21 |
+
return probability, sentiment
|
22 |
+
else:
|
23 |
+
return 0, labels[-1]
|
24 |
+
|
25 |
+
|
26 |
+
if __name__ == "__main__":
|
27 |
+
tensor, sentiment = estimate_sentiment(['markets responded negatively to the news!','traders were displeased!'])
|
28 |
+
print(tensor, sentiment)
|
29 |
+
print(torch.cuda.is_available())
|
logs/MLTrader_2024-06-30_21-07-29_logs.csv
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
2024-06-30 21:07:29,741: root: INFO: MLTrader : Executing the initialize lifecycle method
|
2 |
+
2024-06-30 21:07:32,353: root: INFO: Current backtesting datetime 2023-12-15 08:30:00-05:00
|
3 |
+
2024-06-30 21:07:32,354: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
4 |
+
2024-06-30 21:07:32,356: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00
|
5 |
+
2024-06-30 21:07:32,356: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
6 |
+
2024-06-30 21:07:32,358: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:32[0m
|
7 |
+
2024-06-30 21:07:32,358: root: INFO: [32mNew market order of | 10 SPY buy | with status unprocessed was submitted.[0m
|
8 |
+
2024-06-30 21:07:32,364: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:32[0m
|
9 |
+
2024-06-30 21:07:32,364: root: INFO: Getting historical prices for SPY, 1 bars,
|
10 |
+
2024-06-30 21:07:32,364: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
11 |
+
2024-06-30 21:07:33,893: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
12 |
+
2024-06-30 21:07:33,894: root: INFO: [32mFilled Transaction: buy 10 of SPY at 469.48999023 USD per share[0m
|
13 |
+
2024-06-30 21:07:33,894: root: INFO: market order of | 10 SPY buy | with status new was filled
|
14 |
+
2024-06-30 21:07:33,900: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
15 |
+
2024-06-30 21:07:33,901: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00
|
16 |
+
2024-06-30 21:07:33,902: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00
|
17 |
+
2024-06-30 21:07:33,904: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
18 |
+
2024-06-30 21:07:33,907: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
19 |
+
2024-06-30 21:07:33,909: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
20 |
+
2024-06-30 21:07:33,909: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
21 |
+
2024-06-30 21:07:33,910: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00
|
22 |
+
2024-06-30 21:07:33,912: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
23 |
+
2024-06-30 21:07:33,913: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
24 |
+
2024-06-30 21:07:33,914: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
25 |
+
2024-06-30 21:07:33,916: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00
|
26 |
+
2024-06-30 21:07:33,916: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
27 |
+
2024-06-30 21:07:33,919: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
28 |
+
2024-06-30 21:07:33,919: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
29 |
+
2024-06-30 21:07:33,921: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
30 |
+
2024-06-30 21:07:33,923: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00
|
31 |
+
2024-06-30 21:07:33,923: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00
|
32 |
+
2024-06-30 21:07:33,925: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
33 |
+
2024-06-30 21:07:33,926: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
34 |
+
2024-06-30 21:07:33,927: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
35 |
+
2024-06-30 21:07:33,928: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00
|
36 |
+
2024-06-30 21:07:33,929: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00
|
37 |
+
2024-06-30 21:07:33,931: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
38 |
+
2024-06-30 21:07:33,931: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
39 |
+
2024-06-30 21:07:33,932: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
40 |
+
2024-06-30 21:07:33,934: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00
|
41 |
+
2024-06-30 21:07:33,934: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00
|
42 |
+
2024-06-30 21:07:33,937: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
43 |
+
2024-06-30 21:07:33,937: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
44 |
+
2024-06-30 21:07:33,939: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
45 |
+
2024-06-30 21:07:33,941: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00
|
46 |
+
2024-06-30 21:07:33,941: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00
|
47 |
+
2024-06-30 21:07:33,944: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
48 |
+
2024-06-30 21:07:33,944: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
49 |
+
2024-06-30 21:07:33,946: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
50 |
+
2024-06-30 21:07:33,948: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00
|
51 |
+
2024-06-30 21:07:33,948: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00
|
52 |
+
2024-06-30 21:07:33,950: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
53 |
+
2024-06-30 21:07:33,953: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
54 |
+
2024-06-30 21:07:33,956: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
55 |
+
2024-06-30 21:07:33,956: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
56 |
+
2024-06-30 21:07:33,957: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00
|
57 |
+
2024-06-30 21:07:33,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
58 |
+
2024-06-30 21:07:33,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
59 |
+
2024-06-30 21:07:33,962: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
60 |
+
2024-06-30 21:07:33,964: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00
|
61 |
+
2024-06-30 21:07:33,964: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
62 |
+
2024-06-30 21:07:33,968: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
63 |
+
2024-06-30 21:07:33,968: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
64 |
+
2024-06-30 21:07:33,971: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
65 |
+
2024-06-30 21:07:33,973: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00
|
66 |
+
2024-06-30 21:07:33,974: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00
|
67 |
+
2024-06-30 21:07:33,977: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
68 |
+
2024-06-30 21:07:33,977: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
69 |
+
2024-06-30 21:07:33,979: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
70 |
+
2024-06-30 21:07:33,981: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00
|
71 |
+
2024-06-30 21:07:33,982: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00
|
72 |
+
2024-06-30 21:07:33,984: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
73 |
+
2024-06-30 21:07:33,984: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
74 |
+
2024-06-30 21:07:33,986: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
75 |
+
2024-06-30 21:07:33,988: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00
|
76 |
+
2024-06-30 21:07:33,988: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00
|
77 |
+
2024-06-30 21:07:33,992: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:07:33[0m
|
78 |
+
2024-06-30 21:07:33,992: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:07:33[0m
|
79 |
+
2024-06-30 21:07:33,993: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
80 |
+
2024-06-30 21:07:33,995: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00
|
81 |
+
2024-06-30 21:07:33,996: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00
|
82 |
+
2024-06-30 21:07:33,998: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
83 |
+
2024-06-30 21:07:34,001: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
84 |
+
2024-06-30 21:07:34,005: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
85 |
+
2024-06-30 21:07:34,005: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
86 |
+
2024-06-30 21:07:34,008: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00
|
87 |
+
2024-06-30 21:07:34,009: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
88 |
+
2024-06-30 21:07:34,010: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
89 |
+
2024-06-30 21:07:34,012: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
90 |
+
2024-06-30 21:07:34,014: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00
|
91 |
+
2024-06-30 21:07:34,014: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
92 |
+
2024-06-30 21:07:34,017: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00
|
93 |
+
2024-06-30 21:07:34,018: root: INFO: MLTrader : Executing the before_market_closes lifecycle method
|
94 |
+
2024-06-30 21:07:34,019: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00
|
95 |
+
2024-06-30 21:07:34,019: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
96 |
+
2024-06-30 21:07:34,020: root: INFO: MLTrader : Executing the on_strategy_end lifecycle method
|
97 |
+
2024-06-30 21:07:34,548: root: INFO: Backtesting finished
|
98 |
+
2024-06-30 21:07:43,113: backtest_stats: INFO: Backtest took 0:00:13.376289 for a speed of 0.000
|
logs/MLTrader_2024-06-30_21-07-29_stats.csv
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,95305.10009765625,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100033.96020751953,95324.16009765625,0.00033960207519534436
|
5 |
+
2023-12-19 09:30:00-05:00,100049.46008544922,95324.16009765625,0.00015494615925959465
|
6 |
+
2023-12-20 09:30:00-05:00,100063.76001220703,95324.16009765625,0.00014292857498277023
|
7 |
+
2023-12-21 09:30:00-05:00,100037.4599633789,95324.16009765625,-0.000262832905988275
|
8 |
+
2023-12-22 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0002529051397568427
|
9 |
+
2023-12-23 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0
|
10 |
+
2023-12-26 09:30:00-05:00,100064.86017089844,95324.16009765625,2.09890245641553e-05
|
11 |
+
2023-12-27 09:30:00-05:00,100078.56012207031,95324.16009765625,0.00013691071119747988
|
12 |
+
2023-12-28 09:30:00-05:00,100092.96014648437,95324.16009765625,0.00014388720617586337
|
13 |
+
2023-12-29 09:30:00-05:00,100089.06,95324.16009765625,-3.8965242697086566e-05
|
14 |
+
2023-12-30 09:30:00-05:00,100089.06,95324.16009765625,0.0
|
logs/MLTrader_2024-06-30_21-07-34_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY"}}
|
logs/MLTrader_2024-06-30_21-07-34_tearsheet.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_21-07-34_trades.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
time,strategy,symbol,side,type,status,multiplier,time_in_force,asset.strike,asset.multiplier,asset.asset_type,price,filled_quantity,trade_cost
|
2 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
3 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,469.489990234375,10,0.0
|
logs/MLTrader_2024-06-30_21-07-34_trades.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_21-18-56_logs.csv
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
2024-06-30 21:18:56,764: root: INFO: MLTrader : Executing the initialize lifecycle method
|
2 |
+
2024-06-30 21:18:59,035: root: INFO: Current backtesting datetime 2023-12-15 08:30:00-05:00
|
3 |
+
2024-06-30 21:18:59,035: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
4 |
+
2024-06-30 21:18:59,044: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00
|
5 |
+
2024-06-30 21:18:59,044: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
6 |
+
2024-06-30 21:18:59,046: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
7 |
+
2024-06-30 21:18:59,046: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
8 |
+
2024-06-30 21:18:59,076: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
9 |
+
2024-06-30 21:18:59,079: root: INFO: [32mNew market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status unprocessed was submitted.[0m
|
10 |
+
2024-06-30 21:18:59,083: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
11 |
+
2024-06-30 21:18:59,083: root: INFO: Getting historical prices for SPY, 1 bars,
|
12 |
+
2024-06-30 21:18:59,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
13 |
+
2024-06-30 21:18:59,083: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
14 |
+
2024-06-30 21:18:59,083: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
15 |
+
2024-06-30 21:18:59,083: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
16 |
+
2024-06-30 21:18:59,083: root: INFO: [32mFilled Transaction: buy 10 of SPY at 469.48999023 USD per share[0m
|
17 |
+
2024-06-30 21:18:59,083: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was filled
|
18 |
+
2024-06-30 21:18:59,094: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
19 |
+
2024-06-30 21:18:59,096: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00
|
20 |
+
2024-06-30 21:18:59,096: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00
|
21 |
+
2024-06-30 21:18:59,100: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
22 |
+
2024-06-30 21:18:59,100: root: INFO: Getting historical prices for SPY, 1 bars,
|
23 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
24 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
25 |
+
2024-06-30 21:18:59,100: root: INFO: Getting historical prices for SPY, 1 bars,
|
26 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
27 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
28 |
+
2024-06-30 21:18:59,100: root: INFO: Getting historical prices for SPY, 1 bars,
|
29 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
30 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
31 |
+
2024-06-30 21:18:59,100: root: INFO: Getting historical prices for SPY, 1 bars,
|
32 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
33 |
+
2024-06-30 21:18:59,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
34 |
+
2024-06-30 21:18:59,108: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
35 |
+
2024-06-30 21:18:59,108: root: INFO: Getting historical prices for SPY, 1 bars,
|
36 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
37 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
38 |
+
2024-06-30 21:18:59,109: root: INFO: Getting historical prices for SPY, 1 bars,
|
39 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
40 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
41 |
+
2024-06-30 21:18:59,109: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
42 |
+
2024-06-30 21:18:59,109: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
43 |
+
2024-06-30 21:18:59,109: root: INFO: Getting historical prices for SPY, 1 bars,
|
44 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
45 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
46 |
+
2024-06-30 21:18:59,109: root: INFO: Getting historical prices for SPY, 1 bars,
|
47 |
+
2024-06-30 21:18:59,109: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
48 |
+
2024-06-30 21:18:59,116: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
49 |
+
2024-06-30 21:18:59,118: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00
|
50 |
+
2024-06-30 21:18:59,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
51 |
+
2024-06-30 21:18:59,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
52 |
+
2024-06-30 21:18:59,118: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
53 |
+
2024-06-30 21:18:59,118: root: INFO: Getting historical prices for SPY, 1 bars,
|
54 |
+
2024-06-30 21:18:59,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
55 |
+
2024-06-30 21:18:59,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
56 |
+
2024-06-30 21:18:59,118: root: INFO: Getting historical prices for SPY, 1 bars,
|
57 |
+
2024-06-30 21:18:59,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
58 |
+
2024-06-30 21:18:59,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
59 |
+
2024-06-30 21:18:59,125: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00
|
60 |
+
2024-06-30 21:18:59,125: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
61 |
+
2024-06-30 21:18:59,125: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
62 |
+
2024-06-30 21:18:59,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
63 |
+
2024-06-30 21:18:59,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
64 |
+
2024-06-30 21:18:59,125: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
65 |
+
2024-06-30 21:18:59,125: root: INFO: Getting historical prices for SPY, 1 bars,
|
66 |
+
2024-06-30 21:18:59,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
67 |
+
2024-06-30 21:18:59,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
68 |
+
2024-06-30 21:18:59,135: root: INFO: Getting historical prices for SPY, 1 bars,
|
69 |
+
2024-06-30 21:18:59,135: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
70 |
+
2024-06-30 21:18:59,136: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
71 |
+
2024-06-30 21:18:59,136: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
72 |
+
2024-06-30 21:18:59,138: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00
|
73 |
+
2024-06-30 21:18:59,141: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00
|
74 |
+
2024-06-30 21:18:59,141: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
75 |
+
2024-06-30 21:18:59,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
76 |
+
2024-06-30 21:18:59,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
77 |
+
2024-06-30 21:18:59,141: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
78 |
+
2024-06-30 21:18:59,141: root: INFO: Getting historical prices for SPY, 1 bars,
|
79 |
+
2024-06-30 21:18:59,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
80 |
+
2024-06-30 21:18:59,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
81 |
+
2024-06-30 21:18:59,141: root: INFO: Getting historical prices for SPY, 1 bars,
|
82 |
+
2024-06-30 21:18:59,147: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
83 |
+
2024-06-30 21:18:59,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
84 |
+
2024-06-30 21:18:59,149: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
85 |
+
2024-06-30 21:18:59,152: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00
|
86 |
+
2024-06-30 21:18:59,153: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00
|
87 |
+
2024-06-30 21:18:59,153: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
88 |
+
2024-06-30 21:18:59,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
89 |
+
2024-06-30 21:18:59,156: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
90 |
+
2024-06-30 21:18:59,157: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
91 |
+
2024-06-30 21:18:59,157: root: INFO: Getting historical prices for SPY, 1 bars,
|
92 |
+
2024-06-30 21:18:59,157: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
93 |
+
2024-06-30 21:18:59,157: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
94 |
+
2024-06-30 21:18:59,159: root: INFO: Getting historical prices for SPY, 1 bars,
|
95 |
+
2024-06-30 21:18:59,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
96 |
+
2024-06-30 21:18:59,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
97 |
+
2024-06-30 21:18:59,159: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
98 |
+
2024-06-30 21:18:59,159: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00
|
99 |
+
2024-06-30 21:18:59,159: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00
|
100 |
+
2024-06-30 21:18:59,167: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
101 |
+
2024-06-30 21:18:59,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
102 |
+
2024-06-30 21:18:59,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
103 |
+
2024-06-30 21:18:59,168: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
104 |
+
2024-06-30 21:18:59,168: root: INFO: Getting historical prices for SPY, 1 bars,
|
105 |
+
2024-06-30 21:18:59,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
106 |
+
2024-06-30 21:18:59,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
107 |
+
2024-06-30 21:18:59,168: root: INFO: Getting historical prices for SPY, 1 bars,
|
108 |
+
2024-06-30 21:18:59,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
109 |
+
2024-06-30 21:18:59,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
110 |
+
2024-06-30 21:18:59,174: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
111 |
+
2024-06-30 21:18:59,175: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00
|
112 |
+
2024-06-30 21:18:59,176: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00
|
113 |
+
2024-06-30 21:18:59,176: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
114 |
+
2024-06-30 21:18:59,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
115 |
+
2024-06-30 21:18:59,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
116 |
+
2024-06-30 21:18:59,176: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
117 |
+
2024-06-30 21:18:59,176: root: INFO: Getting historical prices for SPY, 1 bars,
|
118 |
+
2024-06-30 21:18:59,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
119 |
+
2024-06-30 21:18:59,181: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
120 |
+
2024-06-30 21:18:59,182: root: INFO: Getting historical prices for SPY, 1 bars,
|
121 |
+
2024-06-30 21:18:59,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
122 |
+
2024-06-30 21:18:59,182: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
123 |
+
2024-06-30 21:18:59,182: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
124 |
+
2024-06-30 21:18:59,182: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00
|
125 |
+
2024-06-30 21:18:59,182: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00
|
126 |
+
2024-06-30 21:18:59,190: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
127 |
+
2024-06-30 21:18:59,190: root: INFO: Getting historical prices for SPY, 1 bars,
|
128 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
129 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
130 |
+
2024-06-30 21:18:59,190: root: INFO: Getting historical prices for SPY, 1 bars,
|
131 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
132 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
133 |
+
2024-06-30 21:18:59,190: root: INFO: Getting historical prices for SPY, 1 bars,
|
134 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
135 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
136 |
+
2024-06-30 21:18:59,190: root: INFO: Getting historical prices for SPY, 1 bars,
|
137 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
138 |
+
2024-06-30 21:18:59,190: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
139 |
+
2024-06-30 21:18:59,200: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
140 |
+
2024-06-30 21:18:59,201: root: INFO: Getting historical prices for SPY, 1 bars,
|
141 |
+
2024-06-30 21:18:59,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
142 |
+
2024-06-30 21:18:59,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
143 |
+
2024-06-30 21:18:59,203: root: INFO: Getting historical prices for SPY, 1 bars,
|
144 |
+
2024-06-30 21:18:59,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
145 |
+
2024-06-30 21:18:59,205: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
146 |
+
2024-06-30 21:18:59,207: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
147 |
+
2024-06-30 21:18:59,207: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
148 |
+
2024-06-30 21:18:59,207: root: INFO: Getting historical prices for SPY, 1 bars,
|
149 |
+
2024-06-30 21:18:59,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
150 |
+
2024-06-30 21:18:59,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
151 |
+
2024-06-30 21:18:59,207: root: INFO: Getting historical prices for SPY, 1 bars,
|
152 |
+
2024-06-30 21:18:59,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
153 |
+
2024-06-30 21:18:59,207: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
154 |
+
2024-06-30 21:18:59,207: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00
|
155 |
+
2024-06-30 21:18:59,214: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
156 |
+
2024-06-30 21:18:59,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
157 |
+
2024-06-30 21:18:59,216: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
158 |
+
2024-06-30 21:18:59,216: root: INFO: Getting historical prices for SPY, 1 bars,
|
159 |
+
2024-06-30 21:18:59,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
160 |
+
2024-06-30 21:18:59,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
161 |
+
2024-06-30 21:18:59,216: root: INFO: Getting historical prices for SPY, 1 bars,
|
162 |
+
2024-06-30 21:18:59,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
163 |
+
2024-06-30 21:18:59,216: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
164 |
+
2024-06-30 21:18:59,223: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00
|
165 |
+
2024-06-30 21:18:59,223: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
166 |
+
2024-06-30 21:18:59,223: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
167 |
+
2024-06-30 21:18:59,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
168 |
+
2024-06-30 21:18:59,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
169 |
+
2024-06-30 21:18:59,223: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
170 |
+
2024-06-30 21:18:59,223: root: INFO: Getting historical prices for SPY, 1 bars,
|
171 |
+
2024-06-30 21:18:59,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
172 |
+
2024-06-30 21:18:59,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
173 |
+
2024-06-30 21:18:59,223: root: INFO: Getting historical prices for SPY, 1 bars,
|
174 |
+
2024-06-30 21:18:59,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
175 |
+
2024-06-30 21:18:59,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
176 |
+
2024-06-30 21:18:59,233: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
177 |
+
2024-06-30 21:18:59,233: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00
|
178 |
+
2024-06-30 21:18:59,233: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00
|
179 |
+
2024-06-30 21:18:59,233: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
180 |
+
2024-06-30 21:18:59,239: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
181 |
+
2024-06-30 21:18:59,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
182 |
+
2024-06-30 21:18:59,240: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
183 |
+
2024-06-30 21:18:59,240: root: INFO: Getting historical prices for SPY, 1 bars,
|
184 |
+
2024-06-30 21:18:59,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
185 |
+
2024-06-30 21:18:59,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
186 |
+
2024-06-30 21:18:59,240: root: INFO: Getting historical prices for SPY, 1 bars,
|
187 |
+
2024-06-30 21:18:59,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
188 |
+
2024-06-30 21:18:59,240: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
189 |
+
2024-06-30 21:18:59,240: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
190 |
+
2024-06-30 21:18:59,240: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00
|
191 |
+
2024-06-30 21:18:59,247: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00
|
192 |
+
2024-06-30 21:18:59,249: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
193 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
194 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
195 |
+
2024-06-30 21:18:59,249: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
196 |
+
2024-06-30 21:18:59,249: root: INFO: Getting historical prices for SPY, 1 bars,
|
197 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
198 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
199 |
+
2024-06-30 21:18:59,249: root: INFO: Getting historical prices for SPY, 1 bars,
|
200 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
201 |
+
2024-06-30 21:18:59,249: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
202 |
+
2024-06-30 21:18:59,256: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
203 |
+
2024-06-30 21:18:59,257: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00
|
204 |
+
2024-06-30 21:18:59,257: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00
|
205 |
+
2024-06-30 21:18:59,257: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:18:59[0m
|
206 |
+
2024-06-30 21:18:59,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
207 |
+
2024-06-30 21:18:59,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
208 |
+
2024-06-30 21:18:59,257: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:18:59[0m
|
209 |
+
2024-06-30 21:18:59,257: root: INFO: Getting historical prices for SPY, 1 bars,
|
210 |
+
2024-06-30 21:18:59,257: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
211 |
+
2024-06-30 21:18:59,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
212 |
+
2024-06-30 21:18:59,264: root: INFO: Getting historical prices for SPY, 1 bars,
|
213 |
+
2024-06-30 21:18:59,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
214 |
+
2024-06-30 21:18:59,264: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
215 |
+
2024-06-30 21:18:59,264: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
216 |
+
2024-06-30 21:18:59,264: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00
|
217 |
+
2024-06-30 21:18:59,264: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00
|
218 |
+
2024-06-30 21:18:59,272: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
219 |
+
2024-06-30 21:18:59,272: root: INFO: Getting historical prices for SPY, 1 bars,
|
220 |
+
2024-06-30 21:18:59,272: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
221 |
+
2024-06-30 21:18:59,274: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
222 |
+
2024-06-30 21:18:59,275: root: INFO: Getting historical prices for SPY, 1 bars,
|
223 |
+
2024-06-30 21:18:59,275: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
224 |
+
2024-06-30 21:18:59,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
225 |
+
2024-06-30 21:18:59,276: root: INFO: Getting historical prices for SPY, 1 bars,
|
226 |
+
2024-06-30 21:18:59,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
227 |
+
2024-06-30 21:18:59,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
228 |
+
2024-06-30 21:18:59,276: root: INFO: Getting historical prices for SPY, 1 bars,
|
229 |
+
2024-06-30 21:18:59,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
230 |
+
2024-06-30 21:18:59,276: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
231 |
+
2024-06-30 21:18:59,282: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
232 |
+
2024-06-30 21:18:59,283: root: INFO: Getting historical prices for SPY, 1 bars,
|
233 |
+
2024-06-30 21:18:59,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
234 |
+
2024-06-30 21:18:59,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
235 |
+
2024-06-30 21:18:59,283: root: INFO: Getting historical prices for SPY, 1 bars,
|
236 |
+
2024-06-30 21:18:59,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
237 |
+
2024-06-30 21:18:59,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
238 |
+
2024-06-30 21:18:59,283: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
239 |
+
2024-06-30 21:18:59,283: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
240 |
+
2024-06-30 21:18:59,283: root: INFO: Getting historical prices for SPY, 1 bars,
|
241 |
+
2024-06-30 21:18:59,283: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
242 |
+
2024-06-30 21:18:59,289: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
243 |
+
2024-06-30 21:18:59,289: root: INFO: Getting historical prices for SPY, 1 bars,
|
244 |
+
2024-06-30 21:18:59,289: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
245 |
+
2024-06-30 21:18:59,291: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
246 |
+
2024-06-30 21:18:59,291: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00
|
247 |
+
2024-06-30 21:18:59,291: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
248 |
+
2024-06-30 21:18:59,291: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
249 |
+
2024-06-30 21:18:59,298: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
250 |
+
2024-06-30 21:18:59,298: root: INFO: Getting historical prices for SPY, 1 bars,
|
251 |
+
2024-06-30 21:18:59,298: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
252 |
+
2024-06-30 21:18:59,299: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
253 |
+
2024-06-30 21:18:59,299: root: INFO: Getting historical prices for SPY, 1 bars,
|
254 |
+
2024-06-30 21:18:59,300: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
255 |
+
2024-06-30 21:18:59,300: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
256 |
+
2024-06-30 21:18:59,300: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00
|
257 |
+
2024-06-30 21:18:59,300: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
258 |
+
2024-06-30 21:18:59,305: root: INFO: Getting historical prices for SPY, 1 bars,
|
259 |
+
2024-06-30 21:18:59,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
260 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
261 |
+
2024-06-30 21:18:59,306: root: INFO: Getting historical prices for SPY, 1 bars,
|
262 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
263 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
264 |
+
2024-06-30 21:18:59,306: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00
|
265 |
+
2024-06-30 21:18:59,306: root: INFO: MLTrader : Executing the before_market_closes lifecycle method
|
266 |
+
2024-06-30 21:18:59,306: root: INFO: Getting historical prices for SPY, 1 bars,
|
267 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
268 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
269 |
+
2024-06-30 21:18:59,306: root: INFO: Getting historical prices for SPY, 1 bars,
|
270 |
+
2024-06-30 21:18:59,306: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
271 |
+
2024-06-30 21:18:59,313: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
272 |
+
2024-06-30 21:18:59,315: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00
|
273 |
+
2024-06-30 21:18:59,315: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
274 |
+
2024-06-30 21:18:59,315: root: INFO: MLTrader : Executing the on_strategy_end lifecycle method
|
275 |
+
2024-06-30 21:18:59,712: root: INFO: Backtesting finished
|
276 |
+
2024-06-30 21:19:06,891: backtest_stats: INFO: Backtest took 0:00:10.135333 for a speed of 0.000
|
logs/MLTrader_2024-06-30_21-18-56_stats.csv
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,95305.10009765625,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100033.96020751953,95324.16009765625,0.00033960207519534436
|
5 |
+
2023-12-19 09:30:00-05:00,100049.46008544922,95324.16009765625,0.00015494615925959465
|
6 |
+
2023-12-20 09:30:00-05:00,100063.76001220703,95324.16009765625,0.00014292857498277023
|
7 |
+
2023-12-21 09:30:00-05:00,100037.4599633789,95324.16009765625,-0.000262832905988275
|
8 |
+
2023-12-22 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0002529051397568427
|
9 |
+
2023-12-23 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0
|
10 |
+
2023-12-26 09:30:00-05:00,100064.86017089844,95324.16009765625,2.09890245641553e-05
|
11 |
+
2023-12-27 09:30:00-05:00,100078.56012207031,95324.16009765625,0.00013691071119747988
|
12 |
+
2023-12-28 09:30:00-05:00,100092.96014648437,95324.16009765625,0.00014388720617586337
|
13 |
+
2023-12-29 09:30:00-05:00,100089.06,95324.16009765625,-3.8965242697086566e-05
|
14 |
+
2023-12-30 09:30:00-05:00,100089.06,95324.16009765625,0.0
|
logs/MLTrader_2024-06-30_21-18-59_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}}
|
logs/MLTrader_2024-06-30_21-18-59_tearsheet.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_21-18-59_trades.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
time,strategy,symbol,side,type,status,multiplier,time_in_force,asset.strike,asset.multiplier,asset.asset_type,price,filled_quantity,trade_cost
|
2 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
3 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,469.489990234375,10,0.0
|
logs/MLTrader_2024-06-30_21-18-59_trades.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_21-48-04_logs.csv
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
2024-06-30 21:48:04,726: root: INFO: MLTrader : Executing the initialize lifecycle method
|
2 |
+
2024-06-30 21:48:07,656: root: INFO: Current backtesting datetime 2023-12-15 08:30:00-05:00
|
3 |
+
2024-06-30 21:48:07,658: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
4 |
+
2024-06-30 21:48:07,660: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00
|
5 |
+
2024-06-30 21:48:07,660: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
6 |
+
2024-06-30 21:48:07,662: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:07[0m
|
7 |
+
2024-06-30 21:48:07,663: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
8 |
+
2024-06-30 21:48:07,686: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
9 |
+
2024-06-30 21:48:08,889: root: INFO: [32mNew market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status unprocessed was submitted.[0m
|
10 |
+
2024-06-30 21:48:08,896: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:08[0m
|
11 |
+
2024-06-30 21:48:08,896: root: INFO: Getting historical prices for SPY, 1 bars,
|
12 |
+
2024-06-30 21:48:08,896: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
13 |
+
2024-06-30 21:48:08,897: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
14 |
+
2024-06-30 21:48:08,898: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
15 |
+
2024-06-30 21:48:08,898: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
16 |
+
2024-06-30 21:48:08,898: root: INFO: [32mFilled Transaction: buy 10 of SPY at 469.48999023 USD per share[0m
|
17 |
+
2024-06-30 21:48:08,898: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was filled
|
18 |
+
2024-06-30 21:48:08,908: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
19 |
+
2024-06-30 21:48:08,909: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00
|
20 |
+
2024-06-30 21:48:08,911: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00
|
21 |
+
2024-06-30 21:48:08,915: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
22 |
+
2024-06-30 21:48:08,915: root: INFO: Getting historical prices for SPY, 1 bars,
|
23 |
+
2024-06-30 21:48:08,915: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
24 |
+
2024-06-30 21:48:08,916: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
25 |
+
2024-06-30 21:48:08,917: root: INFO: Getting historical prices for SPY, 1 bars,
|
26 |
+
2024-06-30 21:48:08,917: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
27 |
+
2024-06-30 21:48:08,918: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
28 |
+
2024-06-30 21:48:08,920: root: INFO: Getting historical prices for SPY, 1 bars,
|
29 |
+
2024-06-30 21:48:08,920: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
30 |
+
2024-06-30 21:48:08,921: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
31 |
+
2024-06-30 21:48:08,921: root: INFO: Getting historical prices for SPY, 1 bars,
|
32 |
+
2024-06-30 21:48:08,922: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
33 |
+
2024-06-30 21:48:08,924: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
34 |
+
2024-06-30 21:48:08,927: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
35 |
+
2024-06-30 21:48:08,929: root: INFO: Getting historical prices for SPY, 1 bars,
|
36 |
+
2024-06-30 21:48:08,929: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
37 |
+
2024-06-30 21:48:08,930: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
38 |
+
2024-06-30 21:48:08,932: root: INFO: Getting historical prices for SPY, 1 bars,
|
39 |
+
2024-06-30 21:48:08,932: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
40 |
+
2024-06-30 21:48:08,933: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
41 |
+
2024-06-30 21:48:08,935: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
42 |
+
2024-06-30 21:48:08,935: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
43 |
+
2024-06-30 21:48:08,935: root: INFO: Getting historical prices for SPY, 1 bars,
|
44 |
+
2024-06-30 21:48:08,935: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
45 |
+
2024-06-30 21:48:08,936: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
46 |
+
2024-06-30 21:48:08,937: root: INFO: Getting historical prices for SPY, 1 bars,
|
47 |
+
2024-06-30 21:48:08,937: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
48 |
+
2024-06-30 21:48:08,938: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
49 |
+
2024-06-30 21:48:08,941: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00
|
50 |
+
2024-06-30 21:48:08,942: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
51 |
+
2024-06-30 21:48:08,944: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
52 |
+
2024-06-30 21:48:08,946: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
53 |
+
2024-06-30 21:48:08,946: root: INFO: Getting historical prices for SPY, 1 bars,
|
54 |
+
2024-06-30 21:48:08,946: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
55 |
+
2024-06-30 21:48:08,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
56 |
+
2024-06-30 21:48:08,948: root: INFO: Getting historical prices for SPY, 1 bars,
|
57 |
+
2024-06-30 21:48:08,948: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
58 |
+
2024-06-30 21:48:08,949: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
59 |
+
2024-06-30 21:48:08,952: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00
|
60 |
+
2024-06-30 21:48:08,952: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
61 |
+
2024-06-30 21:48:08,955: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:08[0m
|
62 |
+
2024-06-30 21:48:08,957: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
63 |
+
2024-06-30 21:48:08,958: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
64 |
+
2024-06-30 21:48:08,959: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:08[0m
|
65 |
+
2024-06-30 21:48:08,959: root: INFO: Getting historical prices for SPY, 1 bars,
|
66 |
+
2024-06-30 21:48:08,959: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
67 |
+
2024-06-30 21:48:08,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
68 |
+
2024-06-30 21:48:08,961: root: INFO: Getting historical prices for SPY, 1 bars,
|
69 |
+
2024-06-30 21:48:08,961: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
70 |
+
2024-06-30 21:48:08,962: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
71 |
+
2024-06-30 21:48:08,965: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
72 |
+
2024-06-30 21:48:08,966: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00
|
73 |
+
2024-06-30 21:48:08,967: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00
|
74 |
+
2024-06-30 21:48:08,969: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:08[0m
|
75 |
+
2024-06-30 21:48:08,969: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
76 |
+
2024-06-30 21:48:08,971: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
77 |
+
2024-06-30 21:48:08,971: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:08[0m
|
78 |
+
2024-06-30 21:48:08,971: root: INFO: Getting historical prices for SPY, 1 bars,
|
79 |
+
2024-06-30 21:48:08,973: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
80 |
+
2024-06-30 21:48:08,974: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
81 |
+
2024-06-30 21:48:08,975: root: INFO: Getting historical prices for SPY, 1 bars,
|
82 |
+
2024-06-30 21:48:08,975: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
83 |
+
2024-06-30 21:48:08,976: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
84 |
+
2024-06-30 21:48:08,977: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
85 |
+
2024-06-30 21:48:08,979: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00
|
86 |
+
2024-06-30 21:48:08,979: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00
|
87 |
+
2024-06-30 21:48:08,985: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:08[0m
|
88 |
+
2024-06-30 21:48:08,986: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
89 |
+
2024-06-30 21:48:08,987: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
90 |
+
2024-06-30 21:48:08,989: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:08[0m
|
91 |
+
2024-06-30 21:48:08,989: root: INFO: Getting historical prices for SPY, 1 bars,
|
92 |
+
2024-06-30 21:48:08,989: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
93 |
+
2024-06-30 21:48:08,990: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
94 |
+
2024-06-30 21:48:08,992: root: INFO: Getting historical prices for SPY, 1 bars,
|
95 |
+
2024-06-30 21:48:08,992: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
96 |
+
2024-06-30 21:48:08,993: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
97 |
+
2024-06-30 21:48:08,994: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
98 |
+
2024-06-30 21:48:08,997: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00
|
99 |
+
2024-06-30 21:48:08,997: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00
|
100 |
+
2024-06-30 21:48:09,000: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:08[0m
|
101 |
+
2024-06-30 21:48:09,000: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
102 |
+
2024-06-30 21:48:09,001: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
103 |
+
2024-06-30 21:48:09,002: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
104 |
+
2024-06-30 21:48:09,002: root: INFO: Getting historical prices for SPY, 1 bars,
|
105 |
+
2024-06-30 21:48:09,002: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
106 |
+
2024-06-30 21:48:09,003: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
107 |
+
2024-06-30 21:48:09,004: root: INFO: Getting historical prices for SPY, 1 bars,
|
108 |
+
2024-06-30 21:48:09,004: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
109 |
+
2024-06-30 21:48:09,005: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
110 |
+
2024-06-30 21:48:09,008: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
111 |
+
2024-06-30 21:48:09,010: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00
|
112 |
+
2024-06-30 21:48:09,010: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00
|
113 |
+
2024-06-30 21:48:09,015: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:09[0m
|
114 |
+
2024-06-30 21:48:09,015: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
115 |
+
2024-06-30 21:48:09,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
116 |
+
2024-06-30 21:48:09,018: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
117 |
+
2024-06-30 21:48:09,018: root: INFO: Getting historical prices for SPY, 1 bars,
|
118 |
+
2024-06-30 21:48:09,018: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
119 |
+
2024-06-30 21:48:09,019: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
120 |
+
2024-06-30 21:48:09,020: root: INFO: Getting historical prices for SPY, 1 bars,
|
121 |
+
2024-06-30 21:48:09,020: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
122 |
+
2024-06-30 21:48:09,021: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
123 |
+
2024-06-30 21:48:09,024: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
124 |
+
2024-06-30 21:48:09,026: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00
|
125 |
+
2024-06-30 21:48:09,027: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00
|
126 |
+
2024-06-30 21:48:09,029: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
127 |
+
2024-06-30 21:48:09,029: root: INFO: Getting historical prices for SPY, 1 bars,
|
128 |
+
2024-06-30 21:48:09,029: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
129 |
+
2024-06-30 21:48:09,030: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
130 |
+
2024-06-30 21:48:09,031: root: INFO: Getting historical prices for SPY, 1 bars,
|
131 |
+
2024-06-30 21:48:09,031: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
132 |
+
2024-06-30 21:48:09,033: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
133 |
+
2024-06-30 21:48:09,035: root: INFO: Getting historical prices for SPY, 1 bars,
|
134 |
+
2024-06-30 21:48:09,035: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
135 |
+
2024-06-30 21:48:09,036: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
136 |
+
2024-06-30 21:48:09,036: root: INFO: Getting historical prices for SPY, 1 bars,
|
137 |
+
2024-06-30 21:48:09,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
138 |
+
2024-06-30 21:48:09,037: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
139 |
+
2024-06-30 21:48:09,040: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
140 |
+
2024-06-30 21:48:09,042: root: INFO: Getting historical prices for SPY, 1 bars,
|
141 |
+
2024-06-30 21:48:09,042: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
142 |
+
2024-06-30 21:48:09,043: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
143 |
+
2024-06-30 21:48:09,043: root: INFO: Getting historical prices for SPY, 1 bars,
|
144 |
+
2024-06-30 21:48:09,043: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
145 |
+
2024-06-30 21:48:09,044: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
146 |
+
2024-06-30 21:48:09,046: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
147 |
+
2024-06-30 21:48:09,047: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
148 |
+
2024-06-30 21:48:09,048: root: INFO: Getting historical prices for SPY, 1 bars,
|
149 |
+
2024-06-30 21:48:09,048: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
150 |
+
2024-06-30 21:48:09,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
151 |
+
2024-06-30 21:48:09,050: root: INFO: Getting historical prices for SPY, 1 bars,
|
152 |
+
2024-06-30 21:48:09,050: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
153 |
+
2024-06-30 21:48:09,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
154 |
+
2024-06-30 21:48:09,054: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00
|
155 |
+
2024-06-30 21:48:09,055: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
156 |
+
2024-06-30 21:48:09,057: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
157 |
+
2024-06-30 21:48:09,059: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
158 |
+
2024-06-30 21:48:09,059: root: INFO: Getting historical prices for SPY, 1 bars,
|
159 |
+
2024-06-30 21:48:09,059: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
160 |
+
2024-06-30 21:48:09,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
161 |
+
2024-06-30 21:48:09,060: root: INFO: Getting historical prices for SPY, 1 bars,
|
162 |
+
2024-06-30 21:48:09,060: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
163 |
+
2024-06-30 21:48:09,062: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
164 |
+
2024-06-30 21:48:09,065: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00
|
165 |
+
2024-06-30 21:48:09,065: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
166 |
+
2024-06-30 21:48:09,069: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:09[0m
|
167 |
+
2024-06-30 21:48:09,069: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
168 |
+
2024-06-30 21:48:09,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
169 |
+
2024-06-30 21:48:09,071: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
170 |
+
2024-06-30 21:48:09,071: root: INFO: Getting historical prices for SPY, 1 bars,
|
171 |
+
2024-06-30 21:48:09,071: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
172 |
+
2024-06-30 21:48:09,072: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
173 |
+
2024-06-30 21:48:09,073: root: INFO: Getting historical prices for SPY, 1 bars,
|
174 |
+
2024-06-30 21:48:09,073: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
175 |
+
2024-06-30 21:48:09,074: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
176 |
+
2024-06-30 21:48:09,075: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
177 |
+
2024-06-30 21:48:09,077: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00
|
178 |
+
2024-06-30 21:48:09,077: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00
|
179 |
+
2024-06-30 21:48:09,081: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:09[0m
|
180 |
+
2024-06-30 21:48:09,081: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
181 |
+
2024-06-30 21:48:09,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
182 |
+
2024-06-30 21:48:09,082: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
183 |
+
2024-06-30 21:48:09,082: root: INFO: Getting historical prices for SPY, 1 bars,
|
184 |
+
2024-06-30 21:48:09,082: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
185 |
+
2024-06-30 21:48:09,084: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
186 |
+
2024-06-30 21:48:09,085: root: INFO: Getting historical prices for SPY, 1 bars,
|
187 |
+
2024-06-30 21:48:09,085: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
188 |
+
2024-06-30 21:48:09,086: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
189 |
+
2024-06-30 21:48:09,088: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
190 |
+
2024-06-30 21:48:09,089: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00
|
191 |
+
2024-06-30 21:48:09,090: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00
|
192 |
+
2024-06-30 21:48:09,094: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:09[0m
|
193 |
+
2024-06-30 21:48:09,094: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
194 |
+
2024-06-30 21:48:09,095: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
195 |
+
2024-06-30 21:48:09,096: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
196 |
+
2024-06-30 21:48:09,096: root: INFO: Getting historical prices for SPY, 1 bars,
|
197 |
+
2024-06-30 21:48:09,096: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
198 |
+
2024-06-30 21:48:09,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
199 |
+
2024-06-30 21:48:09,099: root: INFO: Getting historical prices for SPY, 1 bars,
|
200 |
+
2024-06-30 21:48:09,099: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
201 |
+
2024-06-30 21:48:09,100: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
202 |
+
2024-06-30 21:48:09,102: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
203 |
+
2024-06-30 21:48:09,109: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00
|
204 |
+
2024-06-30 21:48:09,109: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00
|
205 |
+
2024-06-30 21:48:09,111: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 21:48:09[0m
|
206 |
+
2024-06-30 21:48:09,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
207 |
+
2024-06-30 21:48:09,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
208 |
+
2024-06-30 21:48:09,115: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 21:48:09[0m
|
209 |
+
2024-06-30 21:48:09,115: root: INFO: Getting historical prices for SPY, 1 bars,
|
210 |
+
2024-06-30 21:48:09,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
211 |
+
2024-06-30 21:48:09,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
212 |
+
2024-06-30 21:48:09,118: root: INFO: Getting historical prices for SPY, 1 bars,
|
213 |
+
2024-06-30 21:48:09,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
214 |
+
2024-06-30 21:48:09,119: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
215 |
+
2024-06-30 21:48:09,121: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
216 |
+
2024-06-30 21:48:09,124: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00
|
217 |
+
2024-06-30 21:48:09,125: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00
|
218 |
+
2024-06-30 21:48:09,127: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
219 |
+
2024-06-30 21:48:09,127: root: INFO: Getting historical prices for SPY, 1 bars,
|
220 |
+
2024-06-30 21:48:09,127: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
221 |
+
2024-06-30 21:48:09,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
222 |
+
2024-06-30 21:48:09,128: root: INFO: Getting historical prices for SPY, 1 bars,
|
223 |
+
2024-06-30 21:48:09,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
224 |
+
2024-06-30 21:48:09,129: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
225 |
+
2024-06-30 21:48:09,132: root: INFO: Getting historical prices for SPY, 1 bars,
|
226 |
+
2024-06-30 21:48:09,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
227 |
+
2024-06-30 21:48:09,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
228 |
+
2024-06-30 21:48:09,134: root: INFO: Getting historical prices for SPY, 1 bars,
|
229 |
+
2024-06-30 21:48:09,134: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
230 |
+
2024-06-30 21:48:09,135: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
231 |
+
2024-06-30 21:48:09,137: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
232 |
+
2024-06-30 21:48:09,138: root: INFO: Getting historical prices for SPY, 1 bars,
|
233 |
+
2024-06-30 21:48:09,138: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
234 |
+
2024-06-30 21:48:09,140: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
235 |
+
2024-06-30 21:48:09,140: root: INFO: Getting historical prices for SPY, 1 bars,
|
236 |
+
2024-06-30 21:48:09,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
237 |
+
2024-06-30 21:48:09,142: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
238 |
+
2024-06-30 21:48:09,144: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
239 |
+
2024-06-30 21:48:09,144: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
240 |
+
2024-06-30 21:48:09,144: root: INFO: Getting historical prices for SPY, 1 bars,
|
241 |
+
2024-06-30 21:48:09,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
242 |
+
2024-06-30 21:48:09,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
243 |
+
2024-06-30 21:48:09,145: root: INFO: Getting historical prices for SPY, 1 bars,
|
244 |
+
2024-06-30 21:48:09,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
245 |
+
2024-06-30 21:48:09,149: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
246 |
+
2024-06-30 21:48:09,152: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00
|
247 |
+
2024-06-30 21:48:09,153: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
248 |
+
2024-06-30 21:48:09,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
249 |
+
2024-06-30 21:48:09,156: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
250 |
+
2024-06-30 21:48:09,156: root: INFO: Getting historical prices for SPY, 1 bars,
|
251 |
+
2024-06-30 21:48:09,157: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
252 |
+
2024-06-30 21:48:09,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
253 |
+
2024-06-30 21:48:09,159: root: INFO: Getting historical prices for SPY, 1 bars,
|
254 |
+
2024-06-30 21:48:09,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
255 |
+
2024-06-30 21:48:09,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
256 |
+
2024-06-30 21:48:09,162: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00
|
257 |
+
2024-06-30 21:48:09,163: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
258 |
+
2024-06-30 21:48:09,165: root: INFO: Getting historical prices for SPY, 1 bars,
|
259 |
+
2024-06-30 21:48:09,165: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
260 |
+
2024-06-30 21:48:09,167: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
261 |
+
2024-06-30 21:48:09,168: root: INFO: Getting historical prices for SPY, 1 bars,
|
262 |
+
2024-06-30 21:48:09,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
263 |
+
2024-06-30 21:48:09,169: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
264 |
+
2024-06-30 21:48:09,170: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00
|
265 |
+
2024-06-30 21:48:09,172: root: INFO: MLTrader : Executing the before_market_closes lifecycle method
|
266 |
+
2024-06-30 21:48:09,172: root: INFO: Getting historical prices for SPY, 1 bars,
|
267 |
+
2024-06-30 21:48:09,172: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
268 |
+
2024-06-30 21:48:09,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
269 |
+
2024-06-30 21:48:09,175: root: INFO: Getting historical prices for SPY, 1 bars,
|
270 |
+
2024-06-30 21:48:09,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
271 |
+
2024-06-30 21:48:09,176: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
272 |
+
2024-06-30 21:48:09,178: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00
|
273 |
+
2024-06-30 21:48:09,178: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
274 |
+
2024-06-30 21:48:09,178: root: INFO: MLTrader : Executing the on_strategy_end lifecycle method
|
275 |
+
2024-06-30 21:48:09,626: root: INFO: Backtesting finished
|
276 |
+
2024-06-30 21:48:17,604: backtest_stats: INFO: Backtest took 0:00:12.881778 for a speed of 0.000
|
logs/MLTrader_2024-06-30_21-48-04_stats.csv
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,95305.10009765625,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100033.96020751953,95324.16009765625,0.00033960207519534436
|
5 |
+
2023-12-19 09:30:00-05:00,100049.46008544922,95324.16009765625,0.00015494615925959465
|
6 |
+
2023-12-20 09:30:00-05:00,100063.76001220703,95324.16009765625,0.00014292857498277023
|
7 |
+
2023-12-21 09:30:00-05:00,100037.4599633789,95324.16009765625,-0.000262832905988275
|
8 |
+
2023-12-22 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0002529051397568427
|
9 |
+
2023-12-23 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0
|
10 |
+
2023-12-26 09:30:00-05:00,100064.86017089844,95324.16009765625,2.09890245641553e-05
|
11 |
+
2023-12-27 09:30:00-05:00,100078.56012207031,95324.16009765625,0.00013691071119747988
|
12 |
+
2023-12-28 09:30:00-05:00,100092.96014648437,95324.16009765625,0.00014388720617586337
|
13 |
+
2023-12-29 09:30:00-05:00,100089.06,95324.16009765625,-3.8965242697086566e-05
|
14 |
+
2023-12-30 09:30:00-05:00,100089.06,95324.16009765625,0.0
|
logs/MLTrader_2024-06-30_21-48-09_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}}
|
logs/MLTrader_2024-06-30_21-48-09_tearsheet.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_21-48-09_trades.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
time,strategy,symbol,side,type,status,multiplier,time_in_force,asset.strike,asset.multiplier,asset.asset_type,price,filled_quantity,trade_cost
|
2 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
3 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,469.489990234375,10,0.0
|
logs/MLTrader_2024-06-30_21-48-09_trades.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_22-02-42_logs.csv
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
2024-06-30 22:02:42,759: root: INFO: MLTrader : Executing the initialize lifecycle method
|
2 |
+
2024-06-30 22:02:45,775: root: INFO: Current backtesting datetime 2023-12-15 08:30:00-05:00
|
3 |
+
2024-06-30 22:02:45,777: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
4 |
+
2024-06-30 22:02:45,779: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00
|
5 |
+
2024-06-30 22:02:45,779: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
6 |
+
2024-06-30 22:02:45,782: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:45[0m
|
7 |
+
2024-06-30 22:02:45,782: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
8 |
+
2024-06-30 22:02:45,798: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
9 |
+
2024-06-30 22:02:47,081: root: INFO: [32mNew market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status unprocessed was submitted.[0m
|
10 |
+
2024-06-30 22:02:47,088: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
11 |
+
2024-06-30 22:02:47,089: root: INFO: Getting historical prices for SPY, 1 bars,
|
12 |
+
2024-06-30 22:02:47,089: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
13 |
+
2024-06-30 22:02:47,091: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
14 |
+
2024-06-30 22:02:47,091: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
15 |
+
2024-06-30 22:02:47,092: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was sent to broker backtesting
|
16 |
+
2024-06-30 22:02:47,092: root: INFO: [32mFilled Transaction: buy 10 of SPY at 469.48999023 USD per share[0m
|
17 |
+
2024-06-30 22:02:47,092: root: INFO: market order of | 10 SPY buy | at price $563.3879882812499 of class bracket with status new was filled
|
18 |
+
2024-06-30 22:02:47,099: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
19 |
+
2024-06-30 22:02:47,103: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00
|
20 |
+
2024-06-30 22:02:47,104: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00
|
21 |
+
2024-06-30 22:02:47,108: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
22 |
+
2024-06-30 22:02:47,108: root: INFO: Getting historical prices for SPY, 1 bars,
|
23 |
+
2024-06-30 22:02:47,108: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
24 |
+
2024-06-30 22:02:47,110: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
25 |
+
2024-06-30 22:02:47,110: root: INFO: Getting historical prices for SPY, 1 bars,
|
26 |
+
2024-06-30 22:02:47,110: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
27 |
+
2024-06-30 22:02:47,112: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
28 |
+
2024-06-30 22:02:47,114: root: INFO: Getting historical prices for SPY, 1 bars,
|
29 |
+
2024-06-30 22:02:47,114: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
30 |
+
2024-06-30 22:02:47,115: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
31 |
+
2024-06-30 22:02:47,117: root: INFO: Getting historical prices for SPY, 1 bars,
|
32 |
+
2024-06-30 22:02:47,117: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
33 |
+
2024-06-30 22:02:47,118: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
34 |
+
2024-06-30 22:02:47,120: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
35 |
+
2024-06-30 22:02:47,121: root: INFO: Getting historical prices for SPY, 1 bars,
|
36 |
+
2024-06-30 22:02:47,122: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
37 |
+
2024-06-30 22:02:47,123: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
38 |
+
2024-06-30 22:02:47,123: root: INFO: Getting historical prices for SPY, 1 bars,
|
39 |
+
2024-06-30 22:02:47,124: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
40 |
+
2024-06-30 22:02:47,125: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
41 |
+
2024-06-30 22:02:47,127: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
42 |
+
2024-06-30 22:02:47,128: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
43 |
+
2024-06-30 22:02:47,128: root: INFO: Getting historical prices for SPY, 1 bars,
|
44 |
+
2024-06-30 22:02:47,128: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
45 |
+
2024-06-30 22:02:47,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
46 |
+
2024-06-30 22:02:47,133: root: INFO: Getting historical prices for SPY, 1 bars,
|
47 |
+
2024-06-30 22:02:47,133: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
48 |
+
2024-06-30 22:02:47,136: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
49 |
+
2024-06-30 22:02:47,139: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00
|
50 |
+
2024-06-30 22:02:47,141: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
51 |
+
2024-06-30 22:02:47,143: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
52 |
+
2024-06-30 22:02:47,144: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
53 |
+
2024-06-30 22:02:47,144: root: INFO: Getting historical prices for SPY, 1 bars,
|
54 |
+
2024-06-30 22:02:47,144: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
55 |
+
2024-06-30 22:02:47,145: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
56 |
+
2024-06-30 22:02:47,146: root: INFO: Getting historical prices for SPY, 1 bars,
|
57 |
+
2024-06-30 22:02:47,146: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
58 |
+
2024-06-30 22:02:47,148: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
59 |
+
2024-06-30 22:02:47,150: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00
|
60 |
+
2024-06-30 22:02:47,150: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
61 |
+
2024-06-30 22:02:47,154: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
62 |
+
2024-06-30 22:02:47,154: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
63 |
+
2024-06-30 22:02:47,157: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
64 |
+
2024-06-30 22:02:47,158: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
65 |
+
2024-06-30 22:02:47,158: root: INFO: Getting historical prices for SPY, 1 bars,
|
66 |
+
2024-06-30 22:02:47,158: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
67 |
+
2024-06-30 22:02:47,159: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
68 |
+
2024-06-30 22:02:47,160: root: INFO: Getting historical prices for SPY, 1 bars,
|
69 |
+
2024-06-30 22:02:47,160: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
70 |
+
2024-06-30 22:02:47,161: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
71 |
+
2024-06-30 22:02:47,164: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
72 |
+
2024-06-30 22:02:47,165: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00
|
73 |
+
2024-06-30 22:02:47,165: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00
|
74 |
+
2024-06-30 22:02:47,168: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
75 |
+
2024-06-30 22:02:47,168: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
76 |
+
2024-06-30 22:02:47,171: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
77 |
+
2024-06-30 22:02:47,172: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
78 |
+
2024-06-30 22:02:47,172: root: INFO: Getting historical prices for SPY, 1 bars,
|
79 |
+
2024-06-30 22:02:47,172: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
80 |
+
2024-06-30 22:02:47,173: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
81 |
+
2024-06-30 22:02:47,174: root: INFO: Getting historical prices for SPY, 1 bars,
|
82 |
+
2024-06-30 22:02:47,174: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
83 |
+
2024-06-30 22:02:47,175: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
84 |
+
2024-06-30 22:02:47,177: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
85 |
+
2024-06-30 22:02:47,180: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00
|
86 |
+
2024-06-30 22:02:47,180: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00
|
87 |
+
2024-06-30 22:02:47,183: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
88 |
+
2024-06-30 22:02:47,184: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
89 |
+
2024-06-30 22:02:47,185: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
90 |
+
2024-06-30 22:02:47,186: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
91 |
+
2024-06-30 22:02:47,186: root: INFO: Getting historical prices for SPY, 1 bars,
|
92 |
+
2024-06-30 22:02:47,186: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
93 |
+
2024-06-30 22:02:47,188: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
94 |
+
2024-06-30 22:02:47,188: root: INFO: Getting historical prices for SPY, 1 bars,
|
95 |
+
2024-06-30 22:02:47,188: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
96 |
+
2024-06-30 22:02:47,189: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
97 |
+
2024-06-30 22:02:47,191: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
98 |
+
2024-06-30 22:02:47,194: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00
|
99 |
+
2024-06-30 22:02:47,194: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00
|
100 |
+
2024-06-30 22:02:47,197: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
101 |
+
2024-06-30 22:02:47,197: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
102 |
+
2024-06-30 22:02:47,199: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
103 |
+
2024-06-30 22:02:47,200: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
104 |
+
2024-06-30 22:02:47,200: root: INFO: Getting historical prices for SPY, 1 bars,
|
105 |
+
2024-06-30 22:02:47,200: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
106 |
+
2024-06-30 22:02:47,201: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
107 |
+
2024-06-30 22:02:47,202: root: INFO: Getting historical prices for SPY, 1 bars,
|
108 |
+
2024-06-30 22:02:47,202: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
109 |
+
2024-06-30 22:02:47,203: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
110 |
+
2024-06-30 22:02:47,205: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
111 |
+
2024-06-30 22:02:47,207: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00
|
112 |
+
2024-06-30 22:02:47,207: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00
|
113 |
+
2024-06-30 22:02:47,211: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
114 |
+
2024-06-30 22:02:47,211: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
115 |
+
2024-06-30 22:02:47,212: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
116 |
+
2024-06-30 22:02:47,213: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
117 |
+
2024-06-30 22:02:47,213: root: INFO: Getting historical prices for SPY, 1 bars,
|
118 |
+
2024-06-30 22:02:47,213: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
119 |
+
2024-06-30 22:02:47,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
120 |
+
2024-06-30 22:02:47,215: root: INFO: Getting historical prices for SPY, 1 bars,
|
121 |
+
2024-06-30 22:02:47,215: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
122 |
+
2024-06-30 22:02:47,217: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
123 |
+
2024-06-30 22:02:47,219: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
124 |
+
2024-06-30 22:02:47,220: root: INFO: Current backtesting datetime 2023-12-22 16:00:00-05:00
|
125 |
+
2024-06-30 22:02:47,220: root: INFO: Current backtesting datetime 2023-12-23 09:30:00-05:00
|
126 |
+
2024-06-30 22:02:47,222: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
127 |
+
2024-06-30 22:02:47,222: root: INFO: Getting historical prices for SPY, 1 bars,
|
128 |
+
2024-06-30 22:02:47,223: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
129 |
+
2024-06-30 22:02:47,225: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
130 |
+
2024-06-30 22:02:47,226: root: INFO: Getting historical prices for SPY, 1 bars,
|
131 |
+
2024-06-30 22:02:47,226: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
132 |
+
2024-06-30 22:02:47,227: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
133 |
+
2024-06-30 22:02:47,229: root: INFO: Getting historical prices for SPY, 1 bars,
|
134 |
+
2024-06-30 22:02:47,229: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
135 |
+
2024-06-30 22:02:47,231: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
136 |
+
2024-06-30 22:02:47,232: root: INFO: Getting historical prices for SPY, 1 bars,
|
137 |
+
2024-06-30 22:02:47,232: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
138 |
+
2024-06-30 22:02:47,234: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
139 |
+
2024-06-30 22:02:47,236: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
140 |
+
2024-06-30 22:02:47,236: root: INFO: Getting historical prices for SPY, 1 bars,
|
141 |
+
2024-06-30 22:02:47,236: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
142 |
+
2024-06-30 22:02:47,237: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
143 |
+
2024-06-30 22:02:47,237: root: INFO: Getting historical prices for SPY, 1 bars,
|
144 |
+
2024-06-30 22:02:47,237: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
145 |
+
2024-06-30 22:02:47,238: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
146 |
+
2024-06-30 22:02:47,241: root: INFO: Current backtesting datetime 2023-12-23 09:29:00-05:00
|
147 |
+
2024-06-30 22:02:47,242: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
148 |
+
2024-06-30 22:02:47,242: root: INFO: Getting historical prices for SPY, 1 bars,
|
149 |
+
2024-06-30 22:02:47,242: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
150 |
+
2024-06-30 22:02:47,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
151 |
+
2024-06-30 22:02:47,244: root: INFO: Getting historical prices for SPY, 1 bars,
|
152 |
+
2024-06-30 22:02:47,244: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
153 |
+
2024-06-30 22:02:47,245: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
154 |
+
2024-06-30 22:02:47,247: root: INFO: Current backtesting datetime 2023-12-26 08:30:00-05:00
|
155 |
+
2024-06-30 22:02:47,248: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
156 |
+
2024-06-30 22:02:47,250: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
157 |
+
2024-06-30 22:02:47,253: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
158 |
+
2024-06-30 22:02:47,253: root: INFO: Getting historical prices for SPY, 1 bars,
|
159 |
+
2024-06-30 22:02:47,253: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
160 |
+
2024-06-30 22:02:47,254: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
161 |
+
2024-06-30 22:02:47,255: root: INFO: Getting historical prices for SPY, 1 bars,
|
162 |
+
2024-06-30 22:02:47,255: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
163 |
+
2024-06-30 22:02:47,256: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
164 |
+
2024-06-30 22:02:47,259: root: INFO: Current backtesting datetime 2023-12-26 09:30:00-05:00
|
165 |
+
2024-06-30 22:02:47,259: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
166 |
+
2024-06-30 22:02:47,263: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
167 |
+
2024-06-30 22:02:47,263: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
168 |
+
2024-06-30 22:02:47,265: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
169 |
+
2024-06-30 22:02:47,266: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
170 |
+
2024-06-30 22:02:47,266: root: INFO: Getting historical prices for SPY, 1 bars,
|
171 |
+
2024-06-30 22:02:47,266: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
172 |
+
2024-06-30 22:02:47,267: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
173 |
+
2024-06-30 22:02:47,268: root: INFO: Getting historical prices for SPY, 1 bars,
|
174 |
+
2024-06-30 22:02:47,268: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
175 |
+
2024-06-30 22:02:47,270: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
176 |
+
2024-06-30 22:02:47,271: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
177 |
+
2024-06-30 22:02:47,273: root: INFO: Current backtesting datetime 2023-12-26 16:00:00-05:00
|
178 |
+
2024-06-30 22:02:47,274: root: INFO: Current backtesting datetime 2023-12-27 09:30:00-05:00
|
179 |
+
2024-06-30 22:02:47,278: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
180 |
+
2024-06-30 22:02:47,278: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
181 |
+
2024-06-30 22:02:47,280: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
182 |
+
2024-06-30 22:02:47,280: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
183 |
+
2024-06-30 22:02:47,281: root: INFO: Getting historical prices for SPY, 1 bars,
|
184 |
+
2024-06-30 22:02:47,281: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
185 |
+
2024-06-30 22:02:47,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
186 |
+
2024-06-30 22:02:47,282: root: INFO: Getting historical prices for SPY, 1 bars,
|
187 |
+
2024-06-30 22:02:47,282: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
188 |
+
2024-06-30 22:02:47,284: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
189 |
+
2024-06-30 22:02:47,287: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
190 |
+
2024-06-30 22:02:47,288: root: INFO: Current backtesting datetime 2023-12-27 16:00:00-05:00
|
191 |
+
2024-06-30 22:02:47,288: root: INFO: Current backtesting datetime 2023-12-28 09:30:00-05:00
|
192 |
+
2024-06-30 22:02:47,290: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
193 |
+
2024-06-30 22:02:47,290: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
194 |
+
2024-06-30 22:02:47,292: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
195 |
+
2024-06-30 22:02:47,293: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
196 |
+
2024-06-30 22:02:47,293: root: INFO: Getting historical prices for SPY, 1 bars,
|
197 |
+
2024-06-30 22:02:47,293: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
198 |
+
2024-06-30 22:02:47,294: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
199 |
+
2024-06-30 22:02:47,294: root: INFO: Getting historical prices for SPY, 1 bars,
|
200 |
+
2024-06-30 22:02:47,294: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
201 |
+
2024-06-30 22:02:47,295: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
202 |
+
2024-06-30 22:02:47,297: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
203 |
+
2024-06-30 22:02:47,298: root: INFO: Current backtesting datetime 2023-12-28 16:00:00-05:00
|
204 |
+
2024-06-30 22:02:47,298: root: INFO: Current backtesting datetime 2023-12-29 09:30:00-05:00
|
205 |
+
2024-06-30 22:02:47,301: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:02:47[0m
|
206 |
+
2024-06-30 22:02:47,301: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
207 |
+
2024-06-30 22:02:47,302: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
208 |
+
2024-06-30 22:02:47,302: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:02:47[0m
|
209 |
+
2024-06-30 22:02:47,302: root: INFO: Getting historical prices for SPY, 1 bars,
|
210 |
+
2024-06-30 22:02:47,302: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
211 |
+
2024-06-30 22:02:47,303: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
212 |
+
2024-06-30 22:02:47,303: root: INFO: Getting historical prices for SPY, 1 bars,
|
213 |
+
2024-06-30 22:02:47,303: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
214 |
+
2024-06-30 22:02:47,305: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
215 |
+
2024-06-30 22:02:47,307: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
216 |
+
2024-06-30 22:02:47,309: root: INFO: Current backtesting datetime 2023-12-29 16:00:00-05:00
|
217 |
+
2024-06-30 22:02:47,309: root: INFO: Current backtesting datetime 2023-12-30 09:30:00-05:00
|
218 |
+
2024-06-30 22:02:47,312: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
219 |
+
2024-06-30 22:02:47,312: root: INFO: Getting historical prices for SPY, 1 bars,
|
220 |
+
2024-06-30 22:02:47,312: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
221 |
+
2024-06-30 22:02:47,314: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
222 |
+
2024-06-30 22:02:47,314: root: INFO: Getting historical prices for SPY, 1 bars,
|
223 |
+
2024-06-30 22:02:47,314: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
224 |
+
2024-06-30 22:02:47,316: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
225 |
+
2024-06-30 22:02:47,318: root: INFO: Getting historical prices for SPY, 1 bars,
|
226 |
+
2024-06-30 22:02:47,318: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
227 |
+
2024-06-30 22:02:47,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
228 |
+
2024-06-30 22:02:47,320: root: INFO: Getting historical prices for SPY, 1 bars,
|
229 |
+
2024-06-30 22:02:47,320: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
230 |
+
2024-06-30 22:02:47,321: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
231 |
+
2024-06-30 22:02:47,323: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
232 |
+
2024-06-30 22:02:47,324: root: INFO: Getting historical prices for SPY, 1 bars,
|
233 |
+
2024-06-30 22:02:47,324: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
234 |
+
2024-06-30 22:02:47,326: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
235 |
+
2024-06-30 22:02:47,327: root: INFO: Getting historical prices for SPY, 1 bars,
|
236 |
+
2024-06-30 22:02:47,327: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
237 |
+
2024-06-30 22:02:47,328: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
238 |
+
2024-06-30 22:02:47,330: root: INFO: Current backtesting datetime 2023-12-30 09:29:00-05:00
|
239 |
+
2024-06-30 22:02:47,330: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
240 |
+
2024-06-30 22:02:47,330: root: INFO: Getting historical prices for SPY, 1 bars,
|
241 |
+
2024-06-30 22:02:47,330: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
242 |
+
2024-06-30 22:02:47,331: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
243 |
+
2024-06-30 22:02:47,331: root: INFO: Getting historical prices for SPY, 1 bars,
|
244 |
+
2024-06-30 22:02:47,333: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
245 |
+
2024-06-30 22:02:47,334: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
246 |
+
2024-06-30 22:02:47,336: root: INFO: Current backtesting datetime 2024-01-02 08:30:00-05:00
|
247 |
+
2024-06-30 22:02:47,337: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
248 |
+
2024-06-30 22:02:47,339: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
249 |
+
2024-06-30 22:02:47,340: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
250 |
+
2024-06-30 22:02:47,340: root: INFO: Getting historical prices for SPY, 1 bars,
|
251 |
+
2024-06-30 22:02:47,340: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
252 |
+
2024-06-30 22:02:47,341: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
253 |
+
2024-06-30 22:02:47,343: root: INFO: Getting historical prices for SPY, 1 bars,
|
254 |
+
2024-06-30 22:02:47,343: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
255 |
+
2024-06-30 22:02:47,344: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
256 |
+
2024-06-30 22:02:47,347: root: INFO: Current backtesting datetime 2024-01-02 09:30:00-05:00
|
257 |
+
2024-06-30 22:02:47,347: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
258 |
+
2024-06-30 22:02:47,348: root: INFO: Getting historical prices for SPY, 1 bars,
|
259 |
+
2024-06-30 22:02:47,348: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
260 |
+
2024-06-30 22:02:47,349: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
261 |
+
2024-06-30 22:02:47,351: root: INFO: Getting historical prices for SPY, 1 bars,
|
262 |
+
2024-06-30 22:02:47,351: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
263 |
+
2024-06-30 22:02:47,352: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
264 |
+
2024-06-30 22:02:47,354: root: INFO: Current backtesting datetime 2024-01-02 15:59:00-05:00
|
265 |
+
2024-06-30 22:02:47,355: root: INFO: MLTrader : Executing the before_market_closes lifecycle method
|
266 |
+
2024-06-30 22:02:47,355: root: INFO: Getting historical prices for SPY, 1 bars,
|
267 |
+
2024-06-30 22:02:47,356: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
268 |
+
2024-06-30 22:02:47,357: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
269 |
+
2024-06-30 22:02:47,358: root: INFO: Getting historical prices for SPY, 1 bars,
|
270 |
+
2024-06-30 22:02:47,359: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
271 |
+
2024-06-30 22:02:47,360: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
272 |
+
2024-06-30 22:02:47,363: root: INFO: Current backtesting datetime 2024-01-02 16:00:00-05:00
|
273 |
+
2024-06-30 22:02:47,363: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
274 |
+
2024-06-30 22:02:47,363: root: INFO: MLTrader : Executing the on_strategy_end lifecycle method
|
275 |
+
2024-06-30 22:02:48,084: root: INFO: Backtesting finished
|
276 |
+
2024-06-30 22:02:54,822: backtest_stats: INFO: Backtest took 0:00:12.068444 for a speed of 0.000
|
logs/MLTrader_2024-06-30_22-02-42_stats.csv
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,95305.10009765625,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100033.96020751953,95324.16009765625,0.00033960207519534436
|
5 |
+
2023-12-19 09:30:00-05:00,100049.46008544922,95324.16009765625,0.00015494615925959465
|
6 |
+
2023-12-20 09:30:00-05:00,100063.76001220703,95324.16009765625,0.00014292857498277023
|
7 |
+
2023-12-21 09:30:00-05:00,100037.4599633789,95324.16009765625,-0.000262832905988275
|
8 |
+
2023-12-22 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0002529051397568427
|
9 |
+
2023-12-23 09:30:00-05:00,100062.75995117187,95324.16009765625,0.0
|
10 |
+
2023-12-26 09:30:00-05:00,100064.86017089844,95324.16009765625,2.09890245641553e-05
|
11 |
+
2023-12-27 09:30:00-05:00,100078.56012207031,95324.16009765625,0.00013691071119747988
|
12 |
+
2023-12-28 09:30:00-05:00,100092.96014648437,95324.16009765625,0.00014388720617586337
|
13 |
+
2023-12-29 09:30:00-05:00,100089.06,95324.16009765625,-3.8965242697086566e-05
|
14 |
+
2023-12-30 09:30:00-05:00,100089.06,95324.16009765625,0.0
|
logs/MLTrader_2024-06-30_22-02-48_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}}
|
logs/MLTrader_2024-06-30_22-02-48_tearsheet.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_22-02-48_trades.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
time,strategy,symbol,side,type,status,multiplier,time_in_force,asset.strike,asset.multiplier,asset.asset_type,price,filled_quantity,trade_cost
|
2 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
3 |
+
2023-12-15 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,469.489990234375,10,0.0
|
logs/MLTrader_2024-06-30_22-02-48_trades.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_22-13-35_logs.csv
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
2024-06-30 22:13:35,424: root: INFO: MLTrader : Executing the initialize lifecycle method
|
2 |
+
2024-06-30 22:13:37,812: root: INFO: Current backtesting datetime 2023-12-15 08:30:00-05:00
|
3 |
+
2024-06-30 22:13:37,814: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
4 |
+
2024-06-30 22:13:37,815: root: INFO: Current backtesting datetime 2023-12-15 09:30:00-05:00
|
5 |
+
2024-06-30 22:13:37,815: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
6 |
+
2024-06-30 22:13:37,818: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:37[0m
|
7 |
+
2024-06-30 22:13:37,819: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
8 |
+
2024-06-30 22:13:37,841: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
9 |
+
2024-06-30 22:13:40,026: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:13:40[0m
|
10 |
+
2024-06-30 22:13:40,034: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
11 |
+
2024-06-30 22:13:40,034: root: INFO: Current backtesting datetime 2023-12-15 16:00:00-05:00
|
12 |
+
2024-06-30 22:13:40,034: root: INFO: Current backtesting datetime 2023-12-16 09:30:00-05:00
|
13 |
+
2024-06-30 22:13:40,039: root: INFO: [34mMLTrader : The market is not currently open, skipping this trading iteration[0m
|
14 |
+
2024-06-30 22:13:40,042: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
15 |
+
2024-06-30 22:13:40,042: root: INFO: Current backtesting datetime 2023-12-16 09:29:00-05:00
|
16 |
+
2024-06-30 22:13:40,045: root: INFO: MLTrader : Executing the after_market_closes lifecycle method
|
17 |
+
2024-06-30 22:13:40,046: root: INFO: Current backtesting datetime 2023-12-18 08:30:00-05:00
|
18 |
+
2024-06-30 22:13:40,048: root: INFO: MLTrader : Executing the before_market_opens lifecycle method
|
19 |
+
2024-06-30 22:13:40,048: root: INFO: Current backtesting datetime 2023-12-18 09:30:00-05:00
|
20 |
+
2024-06-30 22:13:40,048: root: INFO: MLTrader : Executing the before_starting_trading lifecycle method
|
21 |
+
2024-06-30 22:13:40,051: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:40[0m
|
22 |
+
2024-06-30 22:13:40,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
23 |
+
2024-06-30 22:13:40,051: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
24 |
+
2024-06-30 22:13:40,817: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:13:40[0m
|
25 |
+
2024-06-30 22:13:40,821: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
26 |
+
2024-06-30 22:13:40,823: root: INFO: Current backtesting datetime 2023-12-18 16:00:00-05:00
|
27 |
+
2024-06-30 22:13:40,823: root: INFO: Current backtesting datetime 2023-12-19 09:30:00-05:00
|
28 |
+
2024-06-30 22:13:40,823: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:40[0m
|
29 |
+
2024-06-30 22:13:40,823: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
30 |
+
2024-06-30 22:13:40,828: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
31 |
+
2024-06-30 22:13:41,604: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:13:41[0m
|
32 |
+
2024-06-30 22:13:41,607: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
33 |
+
2024-06-30 22:13:41,609: root: INFO: Current backtesting datetime 2023-12-19 16:00:00-05:00
|
34 |
+
2024-06-30 22:13:41,609: root: INFO: Current backtesting datetime 2023-12-20 09:30:00-05:00
|
35 |
+
2024-06-30 22:13:41,611: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:41[0m
|
36 |
+
2024-06-30 22:13:41,611: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
37 |
+
2024-06-30 22:13:41,614: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
38 |
+
2024-06-30 22:13:42,883: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:13:42[0m
|
39 |
+
2024-06-30 22:13:42,886: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
40 |
+
2024-06-30 22:13:42,888: root: INFO: Current backtesting datetime 2023-12-20 16:00:00-05:00
|
41 |
+
2024-06-30 22:13:42,889: root: INFO: Current backtesting datetime 2023-12-21 09:30:00-05:00
|
42 |
+
2024-06-30 22:13:42,890: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:42[0m
|
43 |
+
2024-06-30 22:13:42,891: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
44 |
+
2024-06-30 22:13:42,893: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
45 |
+
2024-06-30 22:13:43,845: root: INFO: [34mMLTrader : Trading iteration ended at 2024-06-30 22:13:43[0m
|
46 |
+
2024-06-30 22:13:43,845: root: INFO: MLTrader : [34mSleeping for 86400 seconds[0m
|
47 |
+
2024-06-30 22:13:43,845: root: INFO: Current backtesting datetime 2023-12-21 16:00:00-05:00
|
48 |
+
2024-06-30 22:13:43,845: root: INFO: Current backtesting datetime 2023-12-22 09:30:00-05:00
|
49 |
+
2024-06-30 22:13:43,853: root: INFO: [34mMLTrader : Executing the on_trading_iteration lifecycle method at 2024-06-30 22:13:43[0m
|
50 |
+
2024-06-30 22:13:43,853: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
51 |
+
2024-06-30 22:13:43,854: root: WARNING: quote is not implemented for YahooData, but USD was passed as the quote
|
52 |
+
2024-06-30 22:13:44,904: root: ERROR: 'MLTrader' object has no attribute 'last_order'
|
53 |
+
2024-06-30 22:13:44,904: root: ERROR: Traceback (most recent call last):
|
54 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 829, in run
|
55 |
+
self._run_trading_session()
|
56 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 780, in _run_trading_session
|
57 |
+
self._on_trading_iteration()
|
58 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 274, in func_output
|
59 |
+
result = func_input(self, *args, **kwargs)
|
60 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 298, in func_output
|
61 |
+
result = func_input(self, *args, **kwargs)
|
62 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 87, in func_output
|
63 |
+
return func_input(self, *args, **kwargs)
|
64 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\strategies\strategy_executor.py", line 378, in _on_trading_iteration
|
65 |
+
on_trading_iteration()
|
66 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\tools\decorators.py", line 62, in func_output
|
67 |
+
frame, result = call_function_get_frame(func_input, *args, **kwargs)
|
68 |
+
File "C:\Users\PRABHAKAR VENKAT\anaconda3\lib\site-packages\lumibot\tools\decorators.py", line 30, in call_function_get_frame
|
69 |
+
result = func(*args, **kwargs)
|
70 |
+
File "F:\lumibot\tradingbot.py", line 68, in on_trading_iteration
|
71 |
+
if self.last_order == "buy":
|
72 |
+
AttributeError: 'MLTrader' object has no attribute 'last_order'
|
73 |
+
|
74 |
+
2024-06-30 22:13:44,912: root: INFO: MLTrader : Executing the on_bot_crash event method
|
75 |
+
2024-06-30 22:13:45,316: root: INFO: Backtesting finished
|
76 |
+
2024-06-30 22:13:45,329: root: INFO: There were no trades in this backtest.
|
77 |
+
2024-06-30 22:13:45,527: root: ERROR: Not enough data to create a tearsheet, at least 2 days of data are required. Skipping
|
78 |
+
2024-06-30 22:13:45,535: backtest_stats: INFO: Backtest took 0:00:10.118576 for a speed of 0.000
|
logs/MLTrader_2024-06-30_22-13-35_stats.csv
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,100000.0,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100000.0,100000.0,0.0
|
5 |
+
2023-12-19 09:30:00-05:00,100000.0,100000.0,0.0
|
6 |
+
2023-12-20 09:30:00-05:00,100000.0,100000.0,0.0
|
7 |
+
2023-12-21 09:30:00-05:00,100000.0,100000.0,0.0
|
logs/MLTrader_2024-06-30_22-13-45_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMHhc7AAAAAA==", {"py/id": 2}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}}
|
logs/MLTrader_2024-06-30_22-16-50_logs.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_22-16-50_stats.csv
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
datetime,portfolio_value,cash,return
|
2 |
+
2023-12-15 09:30:00-05:00,100000.0,100000.0,
|
3 |
+
2023-12-16 09:30:00-05:00,100000.0,100000.0,0.0
|
4 |
+
2023-12-18 09:30:00-05:00,100000.0,100000.0,0.0
|
5 |
+
2023-12-19 09:30:00-05:00,100000.0,100000.0,0.0
|
6 |
+
2023-12-20 09:30:00-05:00,100000.0,100000.0,0.0
|
7 |
+
2023-12-21 09:30:00-05:00,100000.0,100000.0,0.0
|
8 |
+
2023-12-22 09:30:00-05:00,100000.0,100000.0,0.0
|
9 |
+
2023-12-23 09:30:00-05:00,100000.0,104738.59985351562,0.0
|
10 |
+
2023-12-26 09:30:00-05:00,99997.89978027344,104738.59985351562,-2.1002197265640454e-05
|
11 |
+
2023-12-27 09:30:00-05:00,99984.19982910156,104738.59985351562,-0.00013700238906999562
|
12 |
+
2023-12-28 09:30:00-05:00,99969.7998046875,104738.59985351562,-0.0001440230000208098
|
13 |
+
2023-12-29 09:30:00-05:00,99973.69995117188,104738.59985351562,3.901324692057173e-05
|
14 |
+
2023-12-30 09:30:00-05:00,99973.69995117188,104738.59985351562,0.0
|
15 |
+
2024-01-02 09:30:00-05:00,100016.99981689453,104738.59985351562,0.000433112566042837
|
16 |
+
2024-01-03 09:30:00-05:00,100034.29992675781,104738.59985351562,0.00017297169376151444
|
17 |
+
2024-01-04 09:30:00-05:00,100055.59997558594,104738.59985351562,0.000212927454320333
|
18 |
+
2024-01-05 09:30:00-05:00,100063.69995117188,104738.59985351562,8.095474504088429e-05
|
19 |
+
2024-01-06 09:30:00-05:00,100063.69995117188,104738.59985351562,0.0
|
20 |
+
2024-01-08 09:30:00-05:00,100054.29992675781,104738.59985351562,-9.394040414900662e-05
|
21 |
+
2024-01-09 09:30:00-05:00,99985.49987792969,109422.89978027344,-0.0006876271072656648
|
22 |
+
2024-01-10 09:30:00-05:00,99939.69970703125,109422.89978027344,-0.00045806812942228436
|
23 |
+
2024-01-11 09:30:00-05:00,99871.09985351562,109422.89978027344,-0.0006864124438709096
|
24 |
+
2024-01-12 09:30:00-05:00,99866.09985351562,109422.89978027344,-5.006453325673288e-05
|
25 |
+
2024-01-13 09:30:00-05:00,99866.09985351562,109422.89978027344,0.0
|
26 |
+
2024-01-16 09:30:00-05:00,99917.69958496094,109422.89978027344,0.0005166891619978742
|
27 |
+
2024-01-17 09:30:00-05:00,99986.49963378906,109422.89978027344,0.0006885671819298889
|
28 |
+
2024-01-18 09:30:00-05:00,99920.79956054688,114141.09985351562,-0.0006570894419029027
|
29 |
+
2024-01-19 09:30:00-05:00,99811.6000366211,114141.09985351562,-0.0010928607898059717
|
30 |
+
2024-01-20 09:30:00-05:00,99811.6000366211,114141.09985351562,0.0
|
31 |
+
2024-01-22 09:30:00-05:00,99620.79956054688,114141.09985351562,-0.0019116062261722577
|
32 |
+
2024-01-23 09:30:00-05:00,99620.79956054688,114141.09985351562,0.0
|
33 |
+
2024-01-24 09:30:00-05:00,99506.79992675781,114141.09985351562,-0.0011443356637563795
|
34 |
+
2024-01-25 09:30:00-05:00,99513.70025634766,114141.09985351562,6.93453070033101e-05
|
35 |
+
2024-01-26 09:30:00-05:00,99513.3999633789,114141.09985351562,-3.0176042894458632e-06
|
36 |
+
2024-01-27 09:30:00-05:00,99513.3999633789,114141.09985351562,0.0
|
37 |
+
2024-01-29 09:30:00-05:00,99509.19952392578,114141.09985351562,-4.2209787372016194e-05
|
38 |
+
2024-01-30 09:30:00-05:00,99424.29992675781,114141.09985351562,-0.0008531833998680627
|
39 |
+
2024-01-31 09:30:00-05:00,99482.5,114141.09985351562,0.00058537071203979
|
40 |
+
2024-02-01 09:30:00-05:00,99602.19970703125,114141.09985351562,0.0012032237532355605
|
41 |
+
2024-02-02 09:30:00-05:00,99451.6000366211,114141.09985351562,-0.0015120114902394954
|
42 |
+
2024-02-03 09:30:00-05:00,99371.97491455078,104268.47485351562,-0.000800641940813307
|
43 |
+
2024-02-05 09:30:00-05:00,99331.47473144531,104268.47485351562,-0.000407561419004665
|
44 |
+
2024-02-06 09:30:00-05:00,99333.2749633789,104268.47485351562,1.812347937502068e-05
|
45 |
+
2024-02-07 09:30:00-05:00,99305.5747680664,104268.47485351562,-0.00027886119049946867
|
46 |
+
2024-02-08 09:30:00-05:00,99292.94500732422,99292.94500732422,-0.00012718078286833023
|
47 |
+
2024-02-09 09:30:00-05:00,99292.94500732422,99292.94500732422,0.0
|
48 |
+
2024-02-10 09:30:00-05:00,99292.94500732422,99292.94500732422,0.0
|
49 |
+
2024-02-12 09:30:00-05:00,99292.94500732422,99292.94500732422,0.0
|
50 |
+
2024-02-13 09:30:00-05:00,99226.54486083984,94281.24487304688,-0.0006687297519423208
|
51 |
+
2024-02-14 09:30:00-05:00,99249.1449584961,94281.24487304688,0.00022776261823831412
|
52 |
+
2024-02-15 09:30:00-05:00,99274.1449584961,94281.24487304688,0.00025189133881653447
|
53 |
+
2024-02-16 09:30:00-05:00,99298.24499511719,94281.24487304688,0.00024276246983712113
|
54 |
+
2024-02-17 09:30:00-05:00,99298.24499511719,94281.24487304688,0.0
|
55 |
+
2024-02-20 09:30:00-05:00,99258.4448852539,94281.24487304688,-0.00040081382974332946
|
56 |
+
2024-02-21 09:30:00-05:00,99235.44500732422,94281.24487304688,-0.00023171708922375966
|
57 |
+
2024-02-22 09:30:00-05:00,99321.34497070312,94281.24487304688,0.0008656177575721014
|
58 |
+
2024-02-23 09:30:00-05:00,99373.9447631836,94281.24487304688,0.0005295920277357258
|
59 |
+
2024-02-24 09:30:00-05:00,99373.9447631836,94281.24487304688,0.0
|
60 |
+
2024-02-26 09:30:00-05:00,99364.24475097656,94281.24487304688,-9.761122223883589e-05
|
61 |
+
2024-02-27 09:30:00-05:00,99348.24499511719,94281.24487304688,-0.00016102125970440806
|
62 |
+
2024-02-28 09:30:00-05:00,99334.54473876953,94281.24487304688,-0.00013790134237734453
|
63 |
+
2024-02-29 09:30:00-05:00,99361.94494628906,94281.24487304688,0.0002758376513587457
|
64 |
+
2024-03-01 09:30:00-05:00,99371.04498291016,94281.24487304688,9.158472719117405e-05
|
65 |
+
2024-03-02 09:30:00-05:00,99371.04498291016,94281.24487304688,0.0
|
66 |
+
2024-03-04 09:30:00-05:00,99401.54516601562,94281.24487304688,0.0003069322971365196
|
67 |
+
2024-03-05 09:30:00-05:00,99365.74438476562,89160.94458007812,-0.0003601632267407062
|
68 |
+
2024-03-06 09:30:00-05:00,99371.9443359375,89160.94458007812,6.239525714080152e-05
|
69 |
+
2024-03-07 09:30:00-05:00,99423.74487304688,89160.94458007812,0.0005212792952331569
|
70 |
+
2024-03-08 09:30:00-05:00,99470.14501953125,89160.94458007812,0.0004666907944739229
|
71 |
+
2024-03-09 09:30:00-05:00,99470.14501953125,89160.94458007812,0.0
|
72 |
+
2024-03-11 09:30:00-04:00,99429.94482421875,89160.94458007812,-0.00040414332666960373
|
73 |
+
2024-03-12 09:30:00-04:00,99503.14428710938,89160.94458007812,0.000736191325661828
|
74 |
+
2024-03-13 09:30:00-04:00,99500.34399414062,89160.94458007812,-2.8142758591309658e-05
|
75 |
+
2024-03-14 09:30:00-04:00,99365.14440917969,89160.94458007812,-0.0013587851009730922
|
76 |
+
2024-03-15 09:30:00-04:00,99365.14440917969,89160.94458007812,0.0
|
77 |
+
2024-03-16 09:30:00-04:00,99365.14440917969,89160.94458007812,0.0
|
78 |
+
2024-03-18 09:30:00-04:00,99403.94506835938,89160.94458007812,0.0003904856115330979
|
79 |
+
2024-03-19 09:30:00-04:00,99476.34497070312,89160.94458007812,0.000728340331904942
|
80 |
+
2024-03-20 09:30:00-04:00,99628.74487304688,89160.94458007812,0.0015320215312357721
|
81 |
+
2024-03-21 09:30:00-04:00,99603.14428710938,89160.94458007812,-0.00025695983594009597
|
82 |
+
2024-03-22 09:30:00-04:00,99603.14428710938,89160.94458007812,0.0
|
83 |
+
2024-03-23 09:30:00-04:00,99603.14428710938,89160.94458007812,0.0
|
84 |
+
2024-03-25 09:30:00-04:00,99585.54418945312,89160.94458007812,-0.00017670222945487257
|
85 |
+
2024-03-26 09:30:00-04:00,99595.14501953125,89160.94458007812,9.640786879527852e-05
|
86 |
+
2024-03-27 09:30:00-04:00,99625.14501953125,89160.94458007812,0.0003012195021565578
|
87 |
+
2024-03-28 09:30:00-04:00,99625.14501953125,89160.94458007812,0.0
|
88 |
+
2024-03-29 09:30:00-04:00,99625.14501953125,89160.94458007812,0.0
|
89 |
+
2024-04-01 09:30:00-04:00,99525.74438476562,89160.94458007812,-0.000997746449916237
|
90 |
+
2024-04-02 09:30:00-04:00,99515.34399414062,89160.94458007812,-0.00010449950100144267
|
91 |
+
2024-04-03 09:30:00-04:00,99631.34497070312,89160.94458007812,0.0011656592029600787
|
92 |
+
2024-04-04 09:30:00-04:00,99450.14501953125,89160.94458007812,-0.0018187042564281608
|
93 |
+
2024-04-05 09:30:00-04:00,99450.14501953125,89160.94458007812,0.0
|
94 |
+
2024-04-06 09:30:00-04:00,99450.14501953125,89160.94458007812,0.0
|
95 |
+
2024-04-08 09:30:00-04:00,99570.94458007812,89160.94458007812,0.0012146745540004833
|
96 |
+
2024-04-09 09:30:00-04:00,99430.54418945312,89160.94458007812,-0.0014100538185823908
|
97 |
+
2024-04-10 09:30:00-04:00,99474.54443359375,89160.94458007812,0.00044252241098852174
|
98 |
+
2024-04-11 09:30:00-04:00,99448.34448242188,89160.94458007812,-0.00026338347484833324
|
99 |
+
2024-04-12 09:30:00-04:00,99448.34448242188,104592.04443359375,0.0
|
100 |
+
2024-04-13 09:30:00-04:00,99448.34448242188,104592.04443359375,0.0
|
101 |
+
2024-04-15 09:30:00-04:00,99542.64440917969,104592.04443359375,0.0009482302319721025
|
102 |
+
2024-04-16 09:30:00-04:00,99531.54455566406,104592.04443359375,-0.00011150852563246438
|
103 |
+
2024-04-17 09:30:00-04:00,99572.24432373047,104592.04443359375,0.00040891325707947956
|
104 |
+
2024-04-18 09:30:00-04:00,99597.64440917969,104592.04443359375,0.0002550920251092048
|
105 |
+
2024-04-19 09:30:00-04:00,99597.64440917969,104592.04443359375,0.0
|
106 |
+
2024-04-20 09:30:00-04:00,99597.64440917969,104592.04443359375,0.0
|
107 |
+
2024-04-22 09:30:00-04:00,99574.24444580078,104592.04443359375,-0.00023494494792242193
|
108 |
+
2024-04-23 09:30:00-04:00,99526.44445800781,104592.04443359375,-0.0004800436906050587
|
109 |
+
2024-04-24 09:30:00-04:00,99600.24450683594,104592.04443359375,0.000741511959258867
|
110 |
+
2024-04-25 09:30:00-04:00,99528.5443725586,104592.04443359375,-0.0007198790990159409
|
111 |
+
2024-04-26 09:30:00-04:00,99528.5443725586,104592.04443359375,0.0
|
112 |
+
2024-04-27 09:30:00-04:00,99528.5443725586,104592.04443359375,0.0
|
113 |
+
2024-04-29 09:30:00-04:00,99506.44445800781,104592.04443359375,-0.00022204599384123558
|
114 |
+
2024-04-30 09:30:00-04:00,99578.24438476562,104592.04443359375,0.0007215605697590277
|
115 |
+
2024-05-01 09:30:00-04:00,99550.5444946289,104592.04443359375,-0.0002781721078520816
|
116 |
+
2024-05-02 09:30:00-04:00,99480.44439697266,104592.04443359375,-0.0007041658889171964
|
117 |
+
2024-05-03 09:30:00-04:00,99480.44439697266,104592.04443359375,0.0
|
118 |
+
2024-05-04 09:30:00-04:00,99480.44439697266,104592.04443359375,0.0
|
119 |
+
2024-05-06 09:30:00-04:00,99416.44445800781,104592.04443359375,-0.0006433419085810632
|
120 |
+
2024-05-07 09:30:00-04:00,99439.4443359375,104592.04443359375,0.00023134882820530223
|
121 |
+
2024-05-08 09:30:00-04:00,99418.24438476562,104592.04443359375,-0.0002131945860462947
|
122 |
+
2024-05-09 09:30:00-04:00,99373.94445800781,104592.04443359375,-0.0004455915212741024
|
123 |
+
2024-05-10 09:30:00-04:00,99373.94445800781,104592.04443359375,0.0
|
124 |
+
2024-05-11 09:30:00-04:00,99373.94445800781,104592.04443359375,0.0
|
125 |
+
2024-05-13 09:30:00-04:00,99380.94458007812,104592.04443359375,7.044222817653711e-05
|
126 |
+
2024-05-14 09:30:00-04:00,99333.74426269531,104592.04443359375,-0.0004749433362930544
|
127 |
+
2024-05-15 09:30:00-04:00,99293.24438476562,104592.04443359375,-0.0004077152052436306
|
128 |
+
2024-05-16 09:30:00-04:00,99303.94445800781,104592.04443359375,0.00010776234887366343
|
129 |
+
2024-05-17 09:30:00-04:00,99303.94445800781,104592.04443359375,0.0
|
130 |
+
2024-05-18 09:30:00-04:00,99303.94445800781,104592.04443359375,0.0
|
131 |
+
2024-05-20 09:30:00-04:00,99299.244140625,104592.04443359375,-4.733263525902309e-05
|
132 |
+
2024-05-21 09:30:00-04:00,99285.54418945312,104592.04443359375,-0.0001379663187816016
|
133 |
+
2024-05-22 09:30:00-04:00,99262.44421386719,104592.04443359375,-0.0002326620232030452
|
134 |
+
2024-05-23 09:30:00-04:00,99313.54467773438,104592.04443359375,0.0005148015875680034
|
135 |
+
2024-05-24 09:30:00-04:00,99313.54467773438,104592.04443359375,0.0
|
136 |
+
2024-05-25 09:30:00-04:00,99313.54467773438,104592.04443359375,0.0
|
137 |
+
2024-05-28 09:30:00-04:00,99335.24450683594,104592.04443359375,0.00021849818342478677
|
138 |
+
2024-05-29 09:30:00-04:00,99346.84423828125,104592.04443359375,0.00011677357319550552
|
139 |
+
2024-05-30 09:30:00-04:00,99356.14416503906,104592.04443359375,9.361069120128462e-05
|
140 |
+
2024-05-31 09:30:00-04:00,99356.14416503906,104592.04443359375,0.0
|
141 |
+
2024-06-01 09:30:00-04:00,99356.14416503906,104592.04443359375,0.0
|
142 |
+
2024-06-03 09:30:00-04:00,99327.44421386719,104592.04443359375,-0.00028885934949529624
|
143 |
+
2024-06-04 09:30:00-04:00,99284.34423828125,104592.04443359375,-0.0004339180971286716
|
144 |
+
2024-06-05 09:30:00-04:00,99242.24462890625,104592.04443359375,-0.0004240306938418925
|
145 |
+
2024-06-06 09:30:00-04:00,99255.44470214844,104592.04443359375,0.00013300861232568018
|
146 |
+
2024-06-07 09:30:00-04:00,99255.44470214844,104592.04443359375,0.0
|
147 |
+
2024-06-08 09:30:00-04:00,99255.44470214844,104592.04443359375,0.0
|
148 |
+
2024-06-10 09:30:00-04:00,99251.34436035156,104592.04443359375,-4.13110012169593e-05
|
149 |
+
2024-06-11 09:30:00-04:00,99175.74438476562,104592.04443359375,-0.0007617022829580211
|
150 |
+
2024-06-12 09:30:00-04:00,99175.74438476562,99175.74438476562,0.0
|
151 |
+
2024-06-13 09:30:00-04:00,99175.74438476562,99175.74438476562,0.0
|
152 |
+
2024-06-14 09:30:00-04:00,99175.74438476562,99175.74438476562,0.0
|
153 |
+
2024-06-15 09:30:00-04:00,99175.74438476562,93766.9443359375,0.0
|
154 |
+
2024-06-17 09:30:00-04:00,99238.54406738281,93766.9443359375,0.0006332161458102448
|
155 |
+
2024-06-18 09:30:00-04:00,99238.54406738281,93766.9443359375,0.0
|
156 |
+
2024-06-19 09:30:00-04:00,99261.34436035156,93766.9443359375,0.00022975239291356253
|
logs/MLTrader_2024-06-30_22-19-03_settings.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"name": "MLTrader", "backtesting_start": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+cMDwAAAAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -18000, 0, "EST"]}]}]]}, "backtesting_end": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+gGExc7AAAAAA==", {"py/reduce": [{"py/function": "pytz._p"}, {"py/tuple": ["America/New_York", -14400, 3600, "EDT"]}]}]]}, "budget": 100000, "risk_free_rate": 0, "minutes_before_closing": 1, "minutes_before_opening": 60, "sleeptime": "24H", "auto_adjust": false, "quote_asset": {"py/object": "lumibot.entities.asset.Asset", "symbol": "USD", "asset_type": "forex", "strike": 0.0, "multiplier": 1, "precision": null, "expiration": null}, "benchmark_asset": "SPY", "starting_positions": null, "parameters": {"pandas_data": null, "symbol": "SPY", "cash_at_risk": 0.5}}
|
logs/MLTrader_2024-06-30_22-19-03_tearsheet.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
logs/MLTrader_2024-06-30_22-19-03_trades.csv
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
time,strategy,symbol,side,type,status,multiplier,time_in_force,asset.strike,asset.multiplier,asset.asset_type,price,filled_quantity,trade_cost
|
2 |
+
2023-12-22 09:30:00-05:00,MLTrader,SPY,sell,market,new,1,gtc,0.0,1,stock,,,
|
3 |
+
2023-12-22 09:30:00-05:00,MLTrader,SPY,sell,market,fill,1,gtc,0.0,1,stock,473.8599853515625,10,0.0
|
4 |
+
2024-01-08 09:30:00-05:00,MLTrader,SPY,sell,market,new,1,gtc,0.0,1,stock,,,
|
5 |
+
2024-01-08 09:30:00-05:00,MLTrader,SPY,sell,market,fill,1,gtc,0.0,1,stock,468.42999267578125,10,0.0
|
6 |
+
2024-01-17 09:30:00-05:00,MLTrader,SPY,sell,market,new,1,gtc,0.0,1,stock,,,
|
7 |
+
2024-01-17 09:30:00-05:00,MLTrader,SPY,sell,market,fill,1,gtc,0.0,1,stock,471.82000732421875,10,0.0
|
8 |
+
2024-02-02 09:30:00-05:00,MLTrader,SPY,buy,limit,canceled,1,day,0.0,1,stock,,,
|
9 |
+
2024-02-02 09:30:00-05:00,MLTrader,SPY,buy,stop,fill,1,day,0.0,1,stock,491.85149230957035,10,0.0
|
10 |
+
2024-02-02 09:30:00-05:00,MLTrader,SPY,buy,limit,canceled,1,day,0.0,1,stock,,,
|
11 |
+
2024-02-02 09:30:00-05:00,MLTrader,SPY,buy,stop,fill,1,day,0.0,1,stock,495.4110076904297,10,0.0
|
12 |
+
2024-02-07 09:30:00-05:00,MLTrader,SPY,buy,limit,canceled,1,day,0.0,1,stock,,,
|
13 |
+
2024-02-07 09:30:00-05:00,MLTrader,SPY,buy,stop,fill,1,day,0.0,1,stock,497.55298461914066,10,0.0
|
14 |
+
2024-02-12 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
15 |
+
2024-02-12 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,501.1700134277344,10,0.0
|
16 |
+
2024-03-04 09:30:00-05:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
17 |
+
2024-03-04 09:30:00-05:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,512.030029296875,10,0.0
|
18 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,limit,canceled,1,day,0.0,1,stock,,,
|
19 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,stop,canceled,1,day,0.0,1,stock,,,
|
20 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,stop,canceled,1,day,0.0,1,stock,,,
|
21 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,limit,canceled,1,day,0.0,1,stock,,,
|
22 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,market,new,1,day,0.0,1,stock,,,
|
23 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,market,new,1,gtc,0.0,1,stock,,,
|
24 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,market,fill,1,day,0.0,1,stock,514.3699951171875,20.0,0.0
|
25 |
+
2024-04-11 09:30:00-04:00,MLTrader,SPY,sell,market,fill,1,gtc,0.0,1,stock,514.3699951171875,10,0.0
|
26 |
+
2024-06-11 09:30:00-04:00,MLTrader,SPY,buy,limit,canceled,1,day,0.0,1,stock,,,
|
27 |
+
2024-06-11 09:30:00-04:00,MLTrader,SPY,buy,stop,fill,1,day,0.0,1,stock,541.6300048828125,10,0.0
|
28 |
+
2024-06-14 09:30:00-04:00,MLTrader,SPY,buy,market,new,1,gtc,0.0,1,stock,,,
|
29 |
+
2024-06-14 09:30:00-04:00,MLTrader,SPY,buy,market,fill,1,gtc,0.0,1,stock,540.8800048828125,10,0.0
|
logs/MLTrader_2024-06-30_22-19-03_trades.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tradingbot.py
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from lumibot.brokers import Alpaca
|
2 |
+
from lumibot.backtesting import YahooDataBacktesting
|
3 |
+
from lumibot.strategies.strategy import Strategy
|
4 |
+
from lumibot.traders import Trader
|
5 |
+
from datetime import datetime
|
6 |
+
from alpaca_trade_api import REST
|
7 |
+
from timedelta import Timedelta
|
8 |
+
from finbert_utils import estimate_sentiment
|
9 |
+
|
10 |
+
API_KEY = "Your_API"
|
11 |
+
API_SECRET = "Your_Secret"
|
12 |
+
BASE_URL = "Your_Url"
|
13 |
+
|
14 |
+
ALPACA_CREDS = {
|
15 |
+
"API_KEY": API_KEY,
|
16 |
+
"API_SECRET": API_SECRET,
|
17 |
+
"PAPER": True
|
18 |
+
}
|
19 |
+
|
20 |
+
class MLTrader(Strategy):
|
21 |
+
def initialize(self, symbol:str="SPY", cash_at_risk:float=.5):
|
22 |
+
self.symbol = symbol
|
23 |
+
self.sleeptime = "24H"
|
24 |
+
self.last_trade = None
|
25 |
+
self.cash_at_risk = cash_at_risk
|
26 |
+
self.api = REST(base_url=BASE_URL, key_id=API_KEY, secret_key=API_SECRET)
|
27 |
+
|
28 |
+
def position_sizing(self):
|
29 |
+
cash = self.get_cash()
|
30 |
+
last_price = self.get_last_price(self.symbol)
|
31 |
+
quantity = round(cash * self.cash_at_risk / last_price)
|
32 |
+
return cash, last_price, quantity
|
33 |
+
|
34 |
+
def get_dates(self):
|
35 |
+
today = self.get_datetime()
|
36 |
+
three_days_prior = today - Timedelta(days=3)
|
37 |
+
return today.strftime('%Y-%m-%d'), three_days_prior.strftime('%Y-%m-%d')
|
38 |
+
|
39 |
+
def get_sentiment(self):
|
40 |
+
today, three_days_prior = self.get_dates()
|
41 |
+
news = self.api.get_news(symbol=self.symbol,
|
42 |
+
start=three_days_prior,
|
43 |
+
end=today)
|
44 |
+
news = [ev.__dict__["_raw"]["headline"] for ev in news]
|
45 |
+
probability, sentiment = estimate_sentiment(news)
|
46 |
+
return probability, sentiment
|
47 |
+
|
48 |
+
def on_trading_iteration(self):
|
49 |
+
cash, last_price, quantity = self.position_sizing()
|
50 |
+
probability, sentiment = self.get_sentiment()
|
51 |
+
|
52 |
+
if cash > last_price:
|
53 |
+
if sentiment == "positive" and probability > .999:
|
54 |
+
if self.last_trade == "sell":
|
55 |
+
self.sell_all()
|
56 |
+
order = self.create_order(
|
57 |
+
self.symbol,
|
58 |
+
10,
|
59 |
+
"buy",
|
60 |
+
type="bracket",
|
61 |
+
take_profit_price=last_price*1.20,
|
62 |
+
stop_loss_price=last_price*.95
|
63 |
+
)
|
64 |
+
self.submit_order(order)
|
65 |
+
self.last_trade = "buy"
|
66 |
+
|
67 |
+
elif sentiment == "negative" and probability > .999:
|
68 |
+
if self.last_trade == "buy":
|
69 |
+
self.sell_all()
|
70 |
+
order = self.create_order(
|
71 |
+
self.symbol,
|
72 |
+
10,
|
73 |
+
"sell",
|
74 |
+
type="bracket",
|
75 |
+
take_profit_price=last_price*.8,
|
76 |
+
stop_loss_price=last_price*1.05
|
77 |
+
)
|
78 |
+
self.submit_order(order)
|
79 |
+
self.last_trade = "sell"
|
80 |
+
|
81 |
+
|
82 |
+
start_date = datetime(2023,12,15)
|
83 |
+
end_date = datetime(2024,6,20)
|
84 |
+
|
85 |
+
broker = Alpaca(ALPACA_CREDS)
|
86 |
+
strategy = MLTrader(name='mlstrat', broker=broker,
|
87 |
+
parameters={"symbol":"SPY",
|
88 |
+
"cash_at_risk":.5})
|
89 |
+
strategy.backtest(
|
90 |
+
YahooDataBacktesting,
|
91 |
+
start_date,
|
92 |
+
end_date,
|
93 |
+
parameters={"symbol":"SPY", "cash_at_risk":.5}
|
94 |
+
)
|
95 |
+
|
96 |
+
# To Deploy
|
97 |
+
# trader = Trader()
|
98 |
+
# trader.add_strategy(strategy)
|
99 |
+
# trader.run_all()
|