OrgTBoot / trading-boot

3 stars 2 forks source link

Order sizing #17

Closed maimas closed 1 year ago

maimas commented 1 year ago

Done when:

Calculation Logic: Given a trading account with buying power of $25,000, we calculate the amount we are willing to risk 3% -> $750 Knowing the max amount we can risk for a BUY order now we can easily calculate the number of shares we purchase by dividing dolarAmountToRisk to sharePrice

Buying power: $25,000
Position risk percent: 3%
Share price: $10

Amount to risk for a position: $25,000 / 3 * 100 --> $750
Shares to buy: $750/$10 --> $75

Risking only 3% of the account on a particular security will allow us to be more resilient to losses.