Add fractional Kelly position sizing
This commit is contained in:
@@ -146,6 +146,7 @@ class CryptoSpotBot:
|
||||
forecast = self.market.forecasts.get(symbol, {})
|
||||
learning = self.learner.adjustment_for(symbol, str(pattern.get("label", ""))).as_dict()
|
||||
learning["adaptive_rules"] = self._with_exposure_context(learning.get("adaptive_rules") or {})
|
||||
account = self.broker.account_state(prices)
|
||||
llm = {}
|
||||
if (
|
||||
self.settings.llm_advisor_enabled
|
||||
@@ -162,10 +163,10 @@ class CryptoSpotBot:
|
||||
pattern=pattern,
|
||||
learning=learning,
|
||||
open_positions_for_symbol=open_count,
|
||||
account=self.broker.account_state(prices),
|
||||
account=account,
|
||||
)
|
||||
).as_dict()
|
||||
signal = self.strategy.entry_signal(symbol, candles, ticker, open_count, pattern, learning, llm, forecast)
|
||||
signal = self.strategy.entry_signal(symbol, candles, ticker, open_count, pattern, learning, llm, forecast, account)
|
||||
self.storage.insert_signal(signal)
|
||||
if signal.action == "BUY" and ticker is not None:
|
||||
self.broker.buy(
|
||||
|
||||
Reference in New Issue
Block a user