Brian - Thank you. Got by with prefer as you mentioned. I totally agree
with you that using trade price to backtest is not a good idea. The problem
is not really with quantstrat. I'm fixing our tick DB a bit now. Once
ready, I will align bid/ask to trade and use that instead. Thank you.


On Tue, Dec 18, 2012 at 10:12 PM, Brian G. Peterson <brian@braverock.com>wrote:

> On 12/18/2012 08:39 PM, Robert A'gata wrote:
>
>> I am wondering when I say pricemethod="market" in add.rule function which
>> price column in mktdata is selected? I skimmed through the code. It seems
>> that if mktdata is BBO, it will pick opposite side price. However, my
>> mktdata contains only price, vwap, deviation. How do I tell add.rule to
>> pick price as opposed to vwap? Thank you.
>>
>
> as is described in the documentation, quantstrat uses the quantmod
> function getPrice to 'guess' at a price column, or uses the prefer=
> argument to choose one.  if you don't have data identifiable as BBO or OHLC
> data by the is.BBO or is.OHLC methods, getPrice will try to get a rational
> price out of your data if you don't specify prefer.
>
> Obviously, aggressive/passive have very little meaning if you're using a
> set of traded prices, and assume that you would have been able to get those
> prices, which seems a pretty shaky assumption.
>
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> ______________________________**_________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-sig-finance<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]]

