hey i need help with a case in my R project.

i have a vector Rt with returns from day 1 till day t  now i want to form a
new vector r= which is rt = Xt − Xt−1

then i want to definde positive and negative aggregates

r(n)+ _t= 1/n (rt +...+rt−n) I {(rt+...+ rt−n) ≥0}
r(n)− _t= 1/n (rt +...+rt−n) I {(rt+...+ rt−n) <0}

thanks for the help 




--
View this message in context: 
http://r.789695.n4.nabble.com/RCOde-need-urgent-HELP-tp4668981.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to