Re: [R] Profit calculation

2012-06-19 Thread Joshua Ulrich
On Tue, Jun 19, 2012 at 6:07 PM, Bert Gunter wrote: > 1. Don't double post. (obviously belongs on finance list) > 2. Homework? (we don't do homework on r-help) > We don't do homework on R-SIG-Finance either... > -- Bert > Best, -- Joshua Ulrich | FOSS Trading: www.fosstrading.com > On Tue, J

Re: [R] Profit calculation

2012-06-19 Thread Bert Gunter
1. Don't double post. (obviously belongs on finance list) 2. Homework? (we don't do homework on r-help) -- Bert On Tue, Jun 19, 2012 at 3:54 PM, Raghuraman Ramachandran < optionsra...@gmail.com> wrote: > Dear guRus > > Say I have a price vector, P which is P = c(20,50,40,50) for four > consecuti

[R] Profit calculation

2012-06-19 Thread Raghuraman Ramachandran
Dear guRus Say I have a price vector, P which is P = c(20,50,40,50) for four consecutive days. My initial equity is say $100 and I re-invest the profits made in each transaction so my equity curve increases. If I go Long on day 1, short and short on day 2, long and long on day 3 and finally shor