[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: More on backtesting with different timeframes



PureBytes Links

Trading Reference Links

I've found a solution for this. I had wanted to find a way to use
indicators based on the weekly timeframe while backtesting in the
daily timeframe, without being subject to the "expandFirst" /
"expandLast" problem.

The solution is to use the indicator as normal, but multiplying the
parameters by five. Thus my 50-week EMA becomes EMA(C,250), and my
weekly MACD(12,26,9) becomes MACD(60,130,45). I've compared the two
visually, and they are virtually identical. 

Hope this helps,
Paul


--- In amibroker@xxxxxxxxxxxxxxx, "polomorabe" <paul.moore@xxx> wrote:
>
> I wonder if anyone can help me with this backtesting problem I've been
> having. I backtest in the daily frame, and as an extra filter, I use
> the slope of the weekly MACD historgram. I use the TimeFrameExpand
> function to bring the weekly data into the daily timeframe.
> 
> For ages, I noticed a discrepancy between my backtest results and my
> daily scan results, and yesterday I think I found the reason for it.
> 
> What I have noticed is that, for example if the weekly MACD-H for IBM
> changes direction on Wednesday's close. This means that when I do my
> daily exploration before the Thursday open, IBM will become a stock
> buy candidate, if all other conditions are satisfied. However, when I
> backtest at the end of the week, IBM appears as a buy candidate on
> Monday, because the weekly MSCD-H condition is satisfied for the
> entire week.
> 
> I went back to the User Manual, and found the explanation for the
> TimeFrameExpand function expandFirst and expandLast parameters. Does
> this mean that the calculated weekly value is made available on either
> Monday or Friday of the given week? 
> 
> Is there a way to correctly backtest the case where the weekly signal
> becomes valid in mid-week?
> 
> Many thanks,
> Paul
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/