Excel Help - Back test some data

hoping someone can help me out with this no doubt trivial problem

I am trying to back test some data in excel and getting the exit to determine profitability of a trading system is proving quite difficult, hoping someone with better excel skills can help with this .

So I want to enter the position say if the closing price on day 0 is below say the 20 day simple moving average, which is simple I get how to figure that out, but the exit of the system is a little more complicated I want to exit on the first profitable day.

so say the first day after is positive then I would want to exit then at the closing price, if it is not positive I would hold out until day 2 and exit then.If day 2 is positive (from your entry price on the close of day 0) . If day 2 is not positive then is goes to day 3 etc until you get a positive exit or 10 days pass in which case you would just sell and take a loss if that is the case.

I appreciate any input, I have been trying to do this if multiple if statements just cant get there.

3 Comments
 
Best Response

In rerum numquam rerum quia voluptatum explicabo atque vel. Sunt fugit dolorem aspernatur adipisci enim saepe consequuntur. Est praesentium ratione velit ipsam aut cum. Architecto eaque aliquid vitae est.

Sed rerum qui et. Amet est architecto modi impedit optio totam consectetur. Incidunt amet vero reiciendis et magnam aliquam expedita qui. Ex fugit et nemo. Enim dolor suscipit tempore officiis temporibus quaerat.

Career Advancement Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.2%

Overall Employee Satisfaction

July 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.3%
  • Banco Santander 02 97.7%
  • BMO Capital Markets 12 97.2%

Professional Growth Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.3%
  • Goldman Sachs 01 97.7%
  • JPMorgan 01 97.2%

Total Avg Compensation

July 2026 Investment Banking

  • Vice President (16) $429
  • Associates (46) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (14) $159
  • 1st Year Analyst (80) $150
  • Intern/Summer Analyst (73) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
kanon's picture
kanon
99.0
3
Secyh62's picture
Secyh62
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
GameTheory's picture
GameTheory
98.9
6
dosk17's picture
dosk17
98.9
7
CompBanker's picture
CompBanker
98.9
8
Betsy Massar's picture
Betsy Massar
98.9
9
DrApeman's picture
DrApeman
98.9
10
Mimbs's picture
Mimbs
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”