lamasticot
New member
- Joined
- Sep 3, 2020
- Messages
- 1
Dear all,
I have the below inputs and formula
My end goal would be to find a formula for max_leverage (instead of current value 109) that would enable to have distance_percent / abs(change_percent_price) = cap_percent.
Is anyone able to find what would be the formula for max_leverage? So that distance_percent / abs(change_percent_price) = cap_percent?
Thank you so much in advance.
Inputs
max_leverage = 109
risk_per_trade = 100
distance_percent = 0.5%
price = 8000
maintenance_rate = 0.4%
LTV = 102%
cap_percent = 98%
Formulas
amount_risked = risk_per_trade * max_leverage * distance_percent
my_investment = risk_per_trade/amount_risked * risk_per_trade
quan = (my_investment * max_leverage) / price
notional_value = quand * price
maintenance_margin = notional_value * maintenance_rate
collateral = LTV * maintenance_margin
unrealized_pnl = collateral - my_investment
change_price_percent = (unrealized_pnl + notional_value) / notional_value - 1
I have the below inputs and formula
My end goal would be to find a formula for max_leverage (instead of current value 109) that would enable to have distance_percent / abs(change_percent_price) = cap_percent.
Is anyone able to find what would be the formula for max_leverage? So that distance_percent / abs(change_percent_price) = cap_percent?
Thank you so much in advance.
Inputs
max_leverage = 109
risk_per_trade = 100
distance_percent = 0.5%
price = 8000
maintenance_rate = 0.4%
LTV = 102%
cap_percent = 98%
Formulas
amount_risked = risk_per_trade * max_leverage * distance_percent
my_investment = risk_per_trade/amount_risked * risk_per_trade
quan = (my_investment * max_leverage) / price
notional_value = quand * price
maintenance_margin = notional_value * maintenance_rate
collateral = LTV * maintenance_margin
unrealized_pnl = collateral - my_investment
change_price_percent = (unrealized_pnl + notional_value) / notional_value - 1