Skip to content
Prev 207400 / 398506 Next

From signals to position vector without using loop

Hello guys, I am having a hard time at trying to avoid loops to get my
position vector from my signal one. My exit decision is based on the
cumulated return over the trade or the number of holding days. I am sure
there is a way to do this with a couple a function and avoid a loop but my
knowledge in R is restricted yet...Can someone please help? thanks