pahautelman / bitcoin-bot

Bitcoin chart visualizer with agent that takes custom actions. Uses simple trading strategy such as buy/sell when programmed combination of indicators cross certain thresholds. Features a trainable reinforcement agent trained on chosen indicators and/ or raw BTC data. Keep stacking 💎
Apache License 2.0
2 stars 0 forks source link

Extend to short positions #9

Open pahautelman opened 1 year ago

pahautelman commented 11 months ago

Position sizing strategies:

Fixed percentage of portfolio: Allocate a fixed percentage of your total portfolio to each trade. For example, you might decide to invest 2% of your portfolio in each trade. Indicator strenght-based: The strength of the indicator can determine the size of the position. For example, a strong buy signal may prompt you to allocate a larger percentage of your portfolio (2%), while a weaker signal might result in a smaller allocation (1%). Stop-loss level based on the risk tolerance. The stop-loss level can be a percentage of the entry price (eg, 2% stop-loss). Ensemble of models to decide the size of the position. Use all/subset of buying strategies (eg: weighted average, based on the performance of each indicator) to decide the strength of the buy/sell signal risk-adjusted sizing. Position based on the risk of the trade. Calculate distance between the entry_price (EP) and stop-loss level (SL) and adjust sizing accordingly. stop-loss = 0.1 EP = 28_000 => SL = 28_000 - 0.1 * 2_800 = 25_200 => potential loss = 2_800 risk tolerance = 0.05 => position sizing = 2_800 / 0.05 = 56_000 ??? Percentage of ATR (Average True Range)