Increase max concurrent positions to 25

This commit is contained in:
2026-04-03 20:05:50 -07:00
parent 8ea1df771b
commit 87add7e797
8 changed files with 571 additions and 384 deletions
+2 -2
View File
@@ -62,7 +62,7 @@
"min_trade_value": 50,
"require_approval": false,
"max_position_pct": 8,
"max_concurrent_positions": 6,
"max_concurrent_positions": 25,
"stop_loss_pct": 1.0,
"take_profit_pct": 1.5,
"min_backtest_sharpe": 0.3,
@@ -71,7 +71,7 @@
},
"safety": {
"max_position_pct": 10,
"max_concurrent_positions": 6,
"max_concurrent_positions": 25,
"max_daily_trades": 50,
"max_daily_loss_pct": 2,
"max_total_loss_pct": 10,
+3
View File
@@ -24,6 +24,9 @@ class SafetyManager:
self.max_total_loss_pct = config.get('max_total_loss_pct', 15) / 100
self.min_trade_value = config.get('min_trade_value', 5.0)
self.initial_capital = config.get('initial_capital', 100.0)
# DEBUG: Log what we actually received
logger.info(f"SafetyManager init: initial_capital={self.initial_capital}, config keys={list(config.keys())}")
# State tracking
self.trading_halted = False
Binary file not shown.
Binary file not shown.
+447 -326
View File
@@ -1,408 +1,529 @@
{
"events": [
{
"time": "2026-03-17T04:50:24Z",
"time": "2026-04-03T19:48:10Z",
"type": "ga_milestone",
"data": {
"generation": 795,
"generation": 6015,
"fitness": 27.5509
}
},
{
"time": "2026-03-17T07:50:45Z",
"time": "2026-04-03T19:48:22Z",
"type": "trade_close",
"data": {
"symbol": "EUR_JPY",
"side": "buy",
"entry_price": null,
"exit_price": 183.808,
"pnl": 0.46,
"pnl_pct": 0.0,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:24Z",
"type": "trade_close",
"data": {
"symbol": "GBP_JPY",
"side": "sell",
"entry_price": null,
"exit_price": 210.616,
"pnl": -4.56,
"pnl_pct": -0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:27Z",
"type": "trade_close",
"data": {
"symbol": "CAD_JPY",
"side": "buy",
"entry_price": null,
"exit_price": 114.464,
"pnl": 3.1,
"pnl_pct": 0.02,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:29Z",
"type": "trade_close",
"data": {
"symbol": "AUD_JPY",
"side": "buy",
"entry_price": null,
"exit_price": 109.936,
"pnl": 7.22,
"pnl_pct": 0.05,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:31Z",
"type": "trade_close",
"data": {
"symbol": "EUR_USD",
"side": "buy",
"entry_price": null,
"exit_price": 1.15144,
"pnl": 6.69,
"pnl_pct": 0.05,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:33Z",
"type": "trade_close",
"data": {
"symbol": "GBP_USD",
"side": "buy",
"entry_price": null,
"exit_price": 1.31936,
"pnl": -1.08,
"pnl_pct": -0.01,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:35Z",
"type": "trade_close",
"data": {
"symbol": "AUD_USD",
"side": "buy",
"entry_price": null,
"exit_price": 0.68858,
"pnl": 4.35,
"pnl_pct": 0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:37Z",
"type": "trade_close",
"data": {
"symbol": "NZD_USD",
"side": "buy",
"entry_price": null,
"exit_price": 0.5689,
"pnl": 3.01,
"pnl_pct": 0.02,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:41Z",
"type": "trade_close",
"data": {
"symbol": "USD_CHF",
"side": "buy",
"entry_price": null,
"exit_price": 0.80108,
"pnl": -4.63,
"pnl_pct": -0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:48:44Z",
"type": "trade_close",
"data": {
"symbol": "EUR_CHF",
"side": "buy",
"entry_price": null,
"exit_price": 0.92242,
"pnl": 1.08,
"pnl_pct": 0.02,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T19:56:33Z",
"type": "trade_open",
"data": {
"symbol": "EUR_JPY",
"side": "sell",
"amount": 77,
"entry_price": 183.81
}
},
{
"time": "2026-04-03T19:56:34Z",
"type": "trade_open",
"data": {
"symbol": "GBP_JPY",
"side": "sell",
"amount": 67,
"entry_price": 210.62
}
},
{
"time": "2026-04-03T19:56:36Z",
"type": "trade_open",
"data": {
"symbol": "CAD_JPY",
"side": "sell",
"amount": 124,
"entry_price": 114.462
}
},
{
"time": "2026-04-03T19:56:38Z",
"type": "trade_open",
"data": {
"symbol": "AUD_JPY",
"side": "sell",
"amount": 129,
"entry_price": 109.913
}
},
{
"time": "2026-04-03T19:56:40Z",
"type": "trade_open",
"data": {
"symbol": "EUR_USD",
"side": "sell",
"amount": 12389,
"entry_price": 1.15144
}
},
{
"time": "2026-04-03T19:56:41Z",
"type": "trade_open",
"data": {
"symbol": "GBP_USD",
"side": "sell",
"amount": 10812,
"entry_price": 1.31936
}
},
{
"time": "2026-04-03T19:56:43Z",
"type": "trade_open",
"data": {
"symbol": "AUD_USD",
"side": "sell",
"amount": 20717,
"entry_price": 0.68854
}
},
{
"time": "2026-04-03T19:56:45Z",
"type": "trade_open",
"data": {
"symbol": "NZD_USD",
"side": "sell",
"amount": 25066,
"entry_price": 0.56904
}
},
{
"time": "2026-04-03T19:56:47Z",
"type": "trade_open",
"data": {
"symbol": "USD_CAD",
"side": "sell",
"amount": 10225,
"entry_price": 1.39481
}
},
{
"time": "2026-04-03T19:56:49Z",
"type": "trade_open",
"data": {
"symbol": "USD_CHF",
"side": "sell",
"amount": 17803,
"entry_price": 0.80109
}
},
{
"time": "2026-04-03T19:56:53Z",
"type": "trade_open",
"data": {
"symbol": "EUR_CHF",
"side": "sell",
"amount": 15460,
"entry_price": 0.92245
}
},
{
"time": "2026-04-03T20:05:12Z",
"type": "trade_close",
"data": {
"symbol": "AUD_JPY",
"side": "buy",
"entry_price": null,
"exit_price": 109.95,
"pnl": -4.77,
"pnl_pct": -0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T20:13:05Z",
"type": "trade_open",
"data": {
"symbol": "USD_JPY",
"side": "sell",
"amount": 89,
"entry_price": 159.568
}
},
{
"time": "2026-04-03T20:13:09Z",
"type": "trade_close",
"data": {
"symbol": "GBP_JPY",
"side": "buy",
"entry_price": null,
"exit_price": 210.638,
"pnl": -0.6,
"pnl_pct": 0,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T20:13:12Z",
"type": "trade_open",
"data": {
"symbol": "AUD_JPY",
"side": "sell",
"amount": 129,
"entry_price": 110.102
}
},
{
"time": "2026-04-03T20:22:43Z",
"type": "ga_milestone",
"data": {
"generation": 810,
"generation": 6045,
"fitness": 27.5509
}
},
{
"time": "2026-03-17T10:52:57Z",
"time": "2026-04-03T20:23:16Z",
"type": "trade_close",
"data": {
"symbol": "EUR_GBP",
"side": "buy",
"entry_price": null,
"exit_price": 0.87312,
"pnl": -3.6,
"pnl_pct": -0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T20:33:03Z",
"type": "trade_close",
"data": {
"symbol": "USD_CAD",
"side": "buy",
"entry_price": null,
"exit_price": 1.39436,
"pnl": 4.6,
"pnl_pct": 0.03,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T20:33:07Z",
"type": "trade_open",
"data": {
"symbol": "EUR_GBP",
"side": "sell",
"amount": 16322,
"entry_price": 0.87311
}
},
{
"time": "2026-04-03T20:33:09Z",
"type": "trade_close",
"data": {
"symbol": "EUR_CHF",
"side": "buy",
"entry_price": null,
"exit_price": 0.92196,
"pnl": 7.58,
"pnl_pct": 0.05,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T20:42:59Z",
"type": "trade_open",
"data": {
"symbol": "USD_CAD",
"side": "sell",
"amount": 10216,
"entry_price": 1.39433
}
},
{
"time": "2026-04-03T20:43:05Z",
"type": "trade_open",
"data": {
"symbol": "EUR_CHF",
"side": "sell",
"amount": 15441,
"entry_price": 0.92246
}
},
{
"time": "2026-04-03T21:05:42Z",
"type": "ga_milestone",
"data": {
"generation": 825,
"generation": 6075,
"fitness": 27.5509
}
},
{
"time": "2026-03-17T13:57:33Z",
"type": "ga_milestone",
"time": "2026-04-03T21:06:14Z",
"type": "trade_close",
"data": {
"generation": 840,
"fitness": 27.5509
"symbol": "EUR_CHF",
"side": "buy",
"entry_price": null,
"exit_price": 0.92218,
"pnl": 2.16,
"pnl_pct": 0,
"exit_reason": "signal"
}
},
{
"time": "2026-03-17T17:01:13Z",
"type": "ga_milestone",
"data": {
"generation": 855,
"fitness": 27.5509
}
},
{
"time": "2026-03-17T20:02:50Z",
"type": "ga_milestone",
"data": {
"generation": 870,
"fitness": 27.5509
}
},
{
"time": "2026-03-17T21:04:19Z",
"time": "2026-04-03T21:16:58Z",
"type": "daily_report",
"data": {
"equity": 100000.0,
"day_pnl": 0.0,
"trades_count": 0
"equity": 194940.73,
"day_pnl": -158.02,
"trades_count": 50
}
},
{
"time": "2026-03-17T23:06:29Z",
"time": "2026-04-03T21:17:26Z",
"type": "trade_close",
"data": {
"symbol": "GBP_USD",
"side": "buy",
"entry_price": null,
"exit_price": 1.31984,
"pnl": -5.19,
"pnl_pct": -0.04,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T21:28:37Z",
"type": "trade_open",
"data": {
"symbol": "GBP_USD",
"side": "sell",
"amount": 10790,
"entry_price": 1.31984
}
},
{
"time": "2026-04-03T21:28:45Z",
"type": "trade_close",
"data": {
"symbol": "USD_CHF",
"side": "buy",
"entry_price": null,
"exit_price": 0.79987,
"pnl": 21.72,
"pnl_pct": 0.15,
"exit_reason": "signal"
}
},
{
"time": "2026-04-03T21:41:19Z",
"type": "ga_milestone",
"data": {
"generation": 885,
"generation": 6105,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T02:08:20Z",
"time": "2026-04-03T21:41:46Z",
"type": "trade_open",
"data": {
"symbol": "USD_CHF",
"side": "sell",
"amount": 17804,
"entry_price": 0.79987
}
},
{
"time": "2026-04-03T22:18:10Z",
"type": "ga_milestone",
"data": {
"generation": 900,
"generation": 6135,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T05:10:29Z",
"time": "2026-04-03T22:54:31Z",
"type": "ga_milestone",
"data": {
"generation": 915,
"generation": 6165,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T08:13:40Z",
"time": "2026-04-03T23:29:15Z",
"type": "ga_milestone",
"data": {
"generation": 930,
"generation": 6195,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T11:20:37Z",
"time": "2026-04-03T23:59:23Z",
"type": "ga_milestone",
"data": {
"generation": 945,
"generation": 6225,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T14:33:37Z",
"time": "2026-04-04T00:35:23Z",
"type": "ga_milestone",
"data": {
"generation": 960,
"generation": 6255,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T17:34:38Z",
"time": "2026-04-04T01:15:06Z",
"type": "ga_milestone",
"data": {
"generation": 975,
"generation": 6285,
"fitness": 27.5509
}
},
{
"time": "2026-03-18T20:38:19Z",
"time": "2026-04-04T01:41:30Z",
"type": "bot_started",
"data": {
"message": "BIGGFISH autonomous trader started"
}
},
{
"time": "2026-04-04T02:06:13Z",
"type": "ga_milestone",
"data": {
"generation": 990,
"fitness": 27.5509
"generation": 30,
"fitness": 2.3924
}
},
{
"time": "2026-03-18T21:02:33Z",
"type": "daily_report",
"data": {
"equity": 100000.0,
"day_pnl": 0.0,
"trades_count": 0
}
},
{
"time": "2026-03-18T23:43:41Z",
"time": "2026-04-04T02:41:13Z",
"type": "ga_milestone",
"data": {
"generation": 1005,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T03:03:41Z",
"type": "ga_milestone",
"data": {
"generation": 1020,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T06:16:54Z",
"type": "ga_milestone",
"data": {
"generation": 1035,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T09:19:52Z",
"type": "ga_milestone",
"data": {
"generation": 1050,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T12:25:40Z",
"type": "ga_milestone",
"data": {
"generation": 1065,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T15:37:18Z",
"type": "ga_milestone",
"data": {
"generation": 1080,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T18:49:30Z",
"type": "ga_milestone",
"data": {
"generation": 1095,
"fitness": 27.5509
}
},
{
"time": "2026-03-19T21:00:43Z",
"type": "daily_report",
"data": {
"equity": 100000.0,
"day_pnl": 0.0,
"trades_count": 0
}
},
{
"time": "2026-03-19T21:58:19Z",
"type": "ga_milestone",
"data": {
"generation": 1110,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T01:10:04Z",
"type": "ga_milestone",
"data": {
"generation": 1125,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T04:21:59Z",
"type": "ga_milestone",
"data": {
"generation": 1140,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T07:31:14Z",
"type": "ga_milestone",
"data": {
"generation": 1155,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T10:39:21Z",
"type": "ga_milestone",
"data": {
"generation": 1170,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T13:42:33Z",
"type": "ga_milestone",
"data": {
"generation": 1185,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T17:01:16Z",
"type": "ga_milestone",
"data": {
"generation": 1200,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T20:04:07Z",
"type": "ga_milestone",
"data": {
"generation": 1215,
"fitness": 27.5509
}
},
{
"time": "2026-03-20T21:05:20Z",
"type": "daily_report",
"data": {
"equity": 100000.0,
"day_pnl": 0.0,
"trades_count": 0
}
},
{
"time": "2026-03-20T23:13:45Z",
"type": "ga_milestone",
"data": {
"generation": 1230,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T02:21:43Z",
"type": "ga_milestone",
"data": {
"generation": 1245,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T05:25:40Z",
"type": "ga_milestone",
"data": {
"generation": 1260,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T08:32:28Z",
"type": "ga_milestone",
"data": {
"generation": 1275,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T11:35:57Z",
"type": "ga_milestone",
"data": {
"generation": 1290,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T14:57:29Z",
"type": "ga_milestone",
"data": {
"generation": 1305,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T18:03:03Z",
"type": "ga_milestone",
"data": {
"generation": 1320,
"fitness": 27.5509
}
},
{
"time": "2026-03-21T21:09:18Z",
"type": "ga_milestone",
"data": {
"generation": 1335,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T00:28:43Z",
"type": "ga_milestone",
"data": {
"generation": 1350,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T03:31:00Z",
"type": "ga_milestone",
"data": {
"generation": 1365,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T06:31:11Z",
"type": "ga_milestone",
"data": {
"generation": 1380,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T09:30:53Z",
"type": "ga_milestone",
"data": {
"generation": 1395,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T12:39:52Z",
"type": "ga_milestone",
"data": {
"generation": 1410,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T15:51:18Z",
"type": "ga_milestone",
"data": {
"generation": 1425,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T18:58:41Z",
"type": "ga_milestone",
"data": {
"generation": 1440,
"fitness": 27.5509
}
},
{
"time": "2026-03-22T21:07:26Z",
"type": "daily_report",
"data": {
"equity": 100000.0,
"day_pnl": 0.0,
"trades_count": 0
}
},
{
"time": "2026-03-22T22:10:40Z",
"type": "ga_milestone",
"data": {
"generation": 1455,
"fitness": 27.5509
"generation": 60,
"fitness": 2.4164
}
}
]
+110 -52
View File
@@ -1,90 +1,118 @@
{
"updated_at": "2026-03-22T23:17:48Z",
"uptime_hours": 144.6,
"updated_at": "2026-04-04T03:02:34Z",
"uptime_hours": 1.4,
"markets": {
"stocks": "CLOSED",
"forex": "OPEN"
"forex": "CLOSED"
},
"portfolio": {
"equity": 198763.9988,
"cash": 198734.41379999998,
"buying_power": 297978.6476,
"portfolio_value": 198763.9988,
"long_market_value": 29.585000000006403,
"day_pnl": 29.585,
"day_pnl_pct": 0.0148867020232205
"equity": 194940.72590000002,
"cash": 195098.74550000002,
"buying_power": 290293.1808,
"portfolio_value": 194940.72590000002,
"long_market_value": -158.01959999999963,
"day_pnl": -158.0196,
"day_pnl_pct": -0.08099467764132803
},
"positions": [
{
"symbol": "NZD_USD",
"qty": 16,
"entry_price": 0.58522,
"current_price": 0.5832075,
"unrealized_pnl": -0.0322
"qty": -25052,
"entry_price": 0.56888,
"current_price": 0.57028,
"unrealized_pnl": -35.0728
},
{
"symbol": "AUD_JPY",
"qty": -134,
"entry_price": 110.027,
"current_price": 110.02806641791045,
"unrealized_pnl": -0.1429
},
{
"symbol": "GBP_JPY",
"qty": -2,
"entry_price": 211.831,
"current_price": 211.83325,
"unrealized_pnl": -0.0045
"qty": -37,
"entry_price": 210.563,
"current_price": 210.5659027027027,
"unrealized_pnl": -0.1074
},
{
"symbol": "AUD_USD",
"qty": 3524,
"entry_price": 0.70794,
"current_price": 0.701260005675369,
"unrealized_pnl": -23.5403
"qty": -20688,
"entry_price": 0.6884,
"current_price": 0.69025,
"unrealized_pnl": -38.2728
},
{
"symbol": "USD_JPY",
"qty": 16,
"entry_price": 159.08,
"current_price": 159.08028125,
"unrealized_pnl": 0.0045
"qty": -75,
"entry_price": 159.527,
"current_price": 159.527976,
"unrealized_pnl": -0.0732
},
{
"symbol": "USD_CHF",
"qty": 12594,
"entry_price": 0.78588,
"current_price": 0.7875482944259171,
"unrealized_pnl": 21.0105
"qty": -30393,
"entry_price": 0.80087,
"current_price": 0.8005771266410028,
"unrealized_pnl": 8.9013
},
{
"symbol": "GBP_USD",
"qty": 19,
"entry_price": 1.33151,
"current_price": 1.3331626315789473,
"unrealized_pnl": 0.0314
"qty": -10796,
"entry_price": 1.31913,
"current_price": 1.3208400037050758,
"unrealized_pnl": -18.4612
},
{
"symbol": "USD_CAD",
"qty": 22,
"entry_price": 1.37093,
"current_price": 1.3716709090909092,
"unrealized_pnl": 0.0163
"qty": -10195,
"entry_price": 1.39395,
"current_price": 1.3948219470328593,
"unrealized_pnl": -8.8895
},
{
"symbol": "EUR_JPY",
"qty": -79,
"entry_price": 183.794,
"current_price": 183.7948936708861,
"unrealized_pnl": -0.0706
},
{
"symbol": "CAD_JPY",
"qty": -125,
"entry_price": 114.432,
"current_price": 114.4328928,
"unrealized_pnl": -0.1116
},
{
"symbol": "EUR_CHF",
"qty": -15444,
"entry_price": 0.92144,
"current_price": 0.9239778464128464,
"unrealized_pnl": -39.1945
},
{
"symbol": "EUR_GBP",
"qty": 5748,
"entry_price": 0.86301,
"current_price": 0.8685684203201114,
"unrealized_pnl": 31.9498
"qty": -22055,
"entry_price": 0.87285,
"current_price": 0.8732789594196327,
"unrealized_pnl": -9.4607
},
{
"symbol": "EUR_USD",
"qty": 25,
"entry_price": 1.15018,
"current_price": 1.15616,
"unrealized_pnl": 0.1495
"qty": -12365,
"entry_price": 1.15134,
"current_price": 1.15272,
"unrealized_pnl": -17.0637
}
],
"learning": {
"ga_generation": 1455,
"ga_best_fitness": 27.5509,
"ga_generation": 60,
"ga_best_fitness": 2.4164,
"rl_epsilon": 0.08,
"rl_experiences": 100000,
"rl_loss": 0.007947
"rl_experiences": 16695,
"rl_loss": 0.037356
},
"today_summary": {
"trades_count": 0,
@@ -94,9 +122,34 @@
},
"config": {
"stock_symbols": [
"SPY",
"QQQ",
"IWM",
"DIA",
"AAPL",
"MSFT",
"GOOGL",
"AMZN",
"NVDA",
"TSLA",
"META",
"JPM",
"BAC",
"GS",
"MS",
"JNJ",
"UNH",
"WMT",
"PG",
"XLE",
"CVX",
"XOM"
"XOM",
"LMT",
"RTX",
"NOC",
"GD",
"USO",
"GLD"
],
"forex_symbols": [
"USD_JPY",
@@ -106,7 +159,12 @@
"AUD_JPY",
"EUR_USD",
"GBP_USD",
"USD_CAD"
"AUD_USD",
"NZD_USD",
"USD_CAD",
"USD_CHF",
"EUR_GBP",
"EUR_CHF"
],
"initial_capital": 200000,
"target_capital": 250000
+1 -1
View File
@@ -40,7 +40,7 @@ class BIGGFISH:
self.broker = AlpacaBroker(self.config["alpaca"])
self.screener = StockScreener(self.config["research"])
self.strategy_manager = StrategyManager(self.config)
self.reporter = Reporter(self.config["reporting"])
self.reporter = Reporter(self.config)
self.running = False
logger.info("✅ BIGGFISH initialized successfully")
+8 -3
View File
@@ -12,6 +12,8 @@ class Reporter:
def __init__(self, config):
self.config = config
self.initial_capital = config.get("trading", {}).get("initial_capital", 100000)
self.target_capital = config.get("trading", {}).get("target_capital", 250000)
self.report_dir = Path(__file__).parent.parent.parent / "data" / "reports"
self.report_dir.mkdir(parents=True, exist_ok=True)
@@ -73,10 +75,13 @@ class Reporter:
text += f"📈 Day P/L: ${p['day_pnl']:.2f} ({p['day_pnl_pct']:+.2f}%)\n\n"
# Goal Progress
target = 1000
current = p['equity']
progress = (current / target) * 100
text += f"🎯 Goal Progress: ${current:.2f} / ${target:.2f} ({progress:.1f}%)\n"
total_pl = current - self.initial_capital
total_pl_pct = (total_pl / self.initial_capital) * 100
progress = (current / self.target_capital) * 100
text += f"📊 Total P&L: ${total_pl:+.2f} ({total_pl_pct:+.1f}%)\n"
text += f"🎯 Goal: ${current:.2f} / ${self.target_capital:.2f} ({progress:.1f}%)\n"
text += self._draw_progress_bar(progress) + "\n\n"
# Positions