logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ageitalia  
#1 Posted : Wednesday, September 20, 2006 9:01:13 AM(UTC)
ageitalia

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/16/2006(UTC)
Posts: 47
Location: Italy

Thanks: 6 times

I'm looking for how many months of year are cointained in my price data.

So, I wrote the following code:

cum(if(month()=10,1,0))

which gives me the number of occurences of an October month in my data. In fact, when I plot an issue - say, AAPL - on monthly scale since May 1987, this indicator grows 'til reaching a "19" value. Correctly.

Now the second step is to create a simple exploration, in which I take all the Nasdaq data, check "Monthly" in the Exploration Periodicity and insert this formula in Column A. Obviously, I am looking for securities with the higher number of October occurencies in my data.

But, with my great astonishment, the exploration results show "zero" value for all the securities previously added. Strange enough, since they're dozens, and I am sure many Octobers occured in the latest years...

Any help?

hayseed  
#2 Posted : Wednesday, September 20, 2006 3:22:58 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey ageitalia.... perhaps the code below might work.... and of course explorations such as this are senistive to the data loading setting for your exploration......h

----------------------


Exploration notes, a deal you can't refuse

Col A: months

a:=If(Month()=10,1,0);

Round(Cum(a)/23 )


Filter colA

Filter enabled Yes
Periodicity Daily
Records required 10000

--------------------

wabbit  
#3 Posted : Wednesday, September 20, 2006 6:57:52 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Please make sure to UNCHECK the "Load Minimum Records" in the Exploration options and load the maximum 32767 records instead. Run the exploration over your monthly data and see if this changes the results.

You might also notice your code can be neatened up slightly:

cum(if(month()=10,1,0));

is exactly the same as:

cum(month()=10);

but the second will run slightly faster as it has fewer operations to complete.



wabbit [:D]


hayseed  
#4 Posted : Wednesday, September 20, 2006 8:26:00 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

dang, now i see why the code worked for yall and not me....... i was using codes for the daily on both the indicator and exploration.....

so overlook my post ageitalia, i must be gettin old, ..... read your post at least 5 times and only now noticed the "monthly"..... oooppps.....h

wabbit  
#5 Posted : Wednesday, September 20, 2006 9:12:32 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
h,

I would take a guess and say that of I was going to run this idea on any time frame less than monthly data, I would do something along the lines of:

Code:

m:=10;
x:=Month()=m AND (Cum(1)=1 OR Alert(Month()<>m,2));
cum(x);


I haven't tested it, but you get the idea?


wabbit [:D]


ageitalia  
#6 Posted : Thursday, September 21, 2006 9:52:56 AM(UTC)
ageitalia

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/16/2006(UTC)
Posts: 47
Location: Italy

Thanks: 6 times

wabbit wrote:
Please make sure to UNCHECK the "Load Minimum Records" in the Exploration options and load the maximum 32767 records instead. Run the exploration over your monthly data and see if this changes the results.

Of course it worked!

it was a problem of minimum records loaded...

Thank you.

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.