Generic algorithm for finding B/E points in spot range

Discussion in 'Strategy Building' started by earth_imperator, Oct 11, 2022.

  1. I first tried to use bsearch algorithm for locating the point where PnL for a complex position
    (ie. which can have more than 1 leg) becomes about 0, but then learned the hard way that there can be more than one B/E point :D
    How best to find such B/E points in an efficient manner with 4 decimals for the spot?
    Can one still use such a fast algorithm like the bsearch one?
    Anybody done such a thing?
     
    Last edited: Oct 11, 2022
  2. 2rosy

    2rosy

    mkt price - vwap = pnl
    solve for pnl = 0
     
  3. You suck, give up
     
  4. Wrong answer! :D

    I already have an idea...
     
  5. 2rosy

    2rosy

    why? OG question was nonsense.
    the answer is subtraction. if you're up 5000 then break even is price where you don't have 5000 anymore.
     
  6. Here my algo. If it looks like Chinese to you then it maybe is :D
    BE-Algo.png
     
    Last edited: Oct 12, 2022
  7. Last edited: Oct 12, 2022
    murray t turtle likes this.
  8. %%
    Good thinking\ i was wanting a chart\ prefer a candle chart but a mountain\ valley is ok.
    STOP out\ or better yet find something better with 50-55% drawdoWns............................\
    dont know if they are still in business\ great gain when they were.
    WEAK= always using leverage, in a public co:caution: