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

RE: [GT] Opinions on date conversion sought



João,

I ran into this situation in the following way: I had been doing some performance evaluation of indicators using timeframe 'day'. As these took a long time to run, I used timeframe 'week' but got some weird results. (I produce summary tables for backtesting which shows the performance of a portfolio on a monthly basis over the years invested.)

Tracking the difference in behavior down I found the issue mentioned earlier, namely that when mapping a weekly analysis into months we end up with situations that, e.g., date computed for week 2008-27 is considered to be part of June (2008/06), but some of the information required for 2008-27 (the days in July that are needed to get the closing price for 2008-27) have not even occurred then.

In such situations it will be better to consider the week to belong to July, as then we deal only with realistic situations.

Whether this is an issue or not depends on the type of analysis you are doing, and the types of summary tables you produce, if any.

I am not sure whether it will always be better to consider dates based on ending dates in conversion, or whether this is only better in the situation I ran into.

In the meantime, I have implemented DateTime routines that allow conversions between timeframes based on end dates, so that users have the option to rely on those when needed...

Cheers, Th.

> -----Original Message-----
> From: João Costa [mailto:joaocosta
AT
zonalivre.org]
> Sent: Tuesday, July 08, 2008 7:42 PM
> To: devel
AT
geniustrader.org
> Subject: Re: [GT] Opinions on date conversion sought
> 
> For some reason I stopped receiving messages from the mailing list for
> the last 3 days, sorry that i keep breaking the topic index that keeps
> messages neatly organized by topic.
> 
> On the particular issue of date conversion as you exposed it, just
> some questions:
> 
> - Is there any particular disadvantage on the way GT currently handles
> this ?
> - How did you come across this ? What's the motivation to change this ?
> 
> 
> From what I could understand from your message, I get the impression
> that doing this in different ways will yield different results, but it
> seems neither way is better/worse than the other, it's just different.
> Is this correct ?