[R-SIG-Finance] quantstrat mktdata subsetting

John Williams john.b.williams at gmail.com
Sat Apr 25 05:01:55 CEST 2015


Nick,

the strategy under test includes an indicator derived from yesterday's HLC:

x = (yesterday's high + yesteday's low + yesterday's close )/3
If (today's close > x)  {
...
} else {
...
}

Trying to figure out how to computer this x in a quantstrat indicator

Thanks for your help





On Fri, Apr 24, 2015 at 9:30 PM, Nick White <n-e-w at qtradr.net> wrote:

> I think this is an interesting question -- but I'm not sure what exactly
> it is you're trying to achieve.
>
> Perhaps you could try posting a detailed example of what your data is, how
> you'd like the output to look and perhaps some code (even pseudo code) so
> we don't have to guess at what you want.
>
> On Sat, Apr 25, 2015 at 9:39 AM, John Williams <john.b.williams at gmail.com>
> wrote:
>
>> Hi,
>>
>> I am just starting to use quantstat.  To calculate quanstrat indicators, I
>> need access to multiple subsets (as granular as individual values) of the
>> mktdata object.
>>
>> How can I subset mktdata for multiple variables/paramters to an indicator
>> function?
>>
>> Thank you for your help.
>> John
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list