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

Notification

Icon
Error

Options
Go to last post Go to first unread
warfield  
#1 Posted : Sunday, July 24, 2005 5:50:45 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

I am trying to write a simple system to evaluate Buy and Hold performance. In the System Tester I have entered: Buy Order Tab: Cum(1)=1 In the Sell Order Tab: Cum(1)=LastValue(Cum(1)) When I run the system simulation, it returns a value that differs from the Buy and Hold performance on the simulation report. Does anyone know what I am doing incorrectly? Thanks, Greg :smt006
Patrick  
#2 Posted : Sunday, July 24, 2005 5:55:38 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Hi Greg, That only returns a number of bars ... Try this C-valuewhen(1,Cum(1)=1,C) Patrick :mrgreen:
warfield  
#3 Posted : Sunday, July 24, 2005 6:02:39 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

Patrick, Thank you for taking the time to help. Do I enter that code into the Buy or Sell tab? I entered it into the sell tab, ran the simulation, and still got different numbers. Thanks, Greg
Patrick  
#4 Posted : Sunday, July 24, 2005 6:06:47 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
oh sorry I though you wanted an exploration ... For the system tester use : {Buy} Cum(1)=1 {Sell} Cum(1) = LastValue(cum(1)) Try this Patrick :mrgreen:
warfield  
#5 Posted : Sunday, July 24, 2005 6:14:17 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

Patrick, Thanks again. What you listed is the code I started with. It always seems to return a higher value than the MS computation of Buy and Hold. I can't figure out why. Thanks, Greg
Patrick  
#6 Posted : Sunday, July 24, 2005 6:17:09 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Quote:
What you listed is the code I started with.
:lol: I'm tired I should go to bed ... :D Hold on let me test something ... Make sure you run a points only test wiht no fancy options ... Patrick :mrgreen:
warfield  
#7 Posted : Sunday, July 24, 2005 6:27:20 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

I made sure Points Only Test was selected and no comm or slippage or anything like that was selected. I still got different profit numbers. I don't want to take advantage of your generosity. But I, like every other person on this board, REALLY appreciate your willingness to help. I feel bad about asking, but I have looked through the Code Primer as well as the User Manual; I can't figure it out. Thank you for your help, Greg =D>
Patrick  
#8 Posted : Sunday, July 24, 2005 6:27:55 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Wow it seems completely wrong ... :D I will take a look at it but unfortunately I doubt I will have the answer before a while. Patrick :mrgreen:
warfield  
#9 Posted : Sunday, July 24, 2005 6:36:10 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

Patrick, Thanks for your help. Greg
Patrick  
#10 Posted : Sunday, July 24, 2005 6:37:25 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Found it :D Apparenlty the system tester does this calculation for buy and hold profit : C-ValueWhen(1,cum(1)=1,O) So it is using the first bar open value to start and not the close value. Patrick :mrgreen:
warfield  
#11 Posted : Sunday, July 24, 2005 6:51:07 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

Does that mean that I should enter that code under the buy tab and leave the sell tab as we have it? Greg
Patrick  
#12 Posted : Sunday, July 24, 2005 6:53:18 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
No that means you have to change your system tester settings to buy at open with 0 delays and sell at close with 0 delay. Your original formula was fine . Patrick :mrgreen:
warfield  
#13 Posted : Sunday, July 24, 2005 7:01:00 PM(UTC)
warfield

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/19/2005(UTC)
Posts: 8

Patrick, That works...Of Course! Thank you so much for your effort. Your a good guy! :smt041 :smt041 :smt041 Greg
Patrick  
#14 Posted : Sunday, July 24, 2005 7:05:16 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
No problem :D Back to doing laundry now :cry: :lol:
Users browsing this topic
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.