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

RE: [amibroker] Re: Long and Inverse Fund - Solution Found



PureBytes Links

Trading Reference Links

Thanks to all who have shared approaches.

 

It appears that different scale factors in producing my WTMix FNU files
has caused the problem.  My long FNU had values in the 1000s while my
short FNU had values in the 10,000s nearer to 100,000.  When I
recalculated my short fund to make its values fall in the low 1000s then
all of a sudden the backtest performed correctly.

 

Bruce, I flushed the cache and retrieved symbols but nothing changed
until I did the step described above.

 

FT does not care what order of magnitude is in the FNUs but apparently
AB cares.

 

I will retry each of the suggestions that have been made to confirm that
ALL work, now that my FNU files are adjusted.

 

Thanks for all the help.

 

Ken

 

-----Original Message-----
From: bruce1r [mailto:brucer@xxxxxxxxx] 
Sent: Sunday, October 03, 2004 3:44 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Long and Inverse Fund

 


Ken - do this then retry

File / Database settings / Flush cache
Configure / Retrieve symbols
Close / OK


--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> Chuck:
> 
> Nice to hear from you.  
> 
> I have tried everything and just had a clue:
> 
> I put in the following code which Bert Steele suggested many 
messages
> ago:
> 
> =================================================
> // test name2. afl
> 
> SetForeign("BRSIX");
> Cond1 = C >= EMA(C, 21) ;
> RestorePriceArrays();
> //Buy = Sell = Short = Cover = 0;
> Buy = (Cond1 == True AND Name() == "BRSIX") OR (Cond1 == False AND
> Name() == "POSSX");
> Sell = (Cond1 == False AND Name() == "BRSIX") OR (Cond1 == True AND
> Name() == "POSSX");
> Short = 0; //Not shorting anything
> Cover = 0;
> Filter = Buy OR Sell;
> AddColumn(C,"Close", 1.2);
> AddColumn (Cond1, "Cond1",1.0);
> AddColumn (Buy, "POSSX to BRSIX", 1, colorDefault, IIf(Buy, 
colorGreen,
> colorDefault));
> AddColumn (Sell, "BRSIX to POSSX", 1, colorDefault, IIf
(Sell,colorRed,
> colorDefault));
> ===============================================
> 
> This worked with BRSIX and POSSX alternating in the trade list.
> 
> I then substituted my "long" and "inverse" funds, which are really 
FNU
> files produced within the FastTrack context (really just txt files 
with
> dates and closing prices).
> 
> In the exact same code as above, I only see my "long" fund (FNU 
file)
> displayed in the Trade list.  I even changed the SetForeign 
statement to
> name my "long" FNU file.
> 
> Since I use these "long" and "inverse" FNU files for all sorts of 
other
> stuff, and they work ok there, I am truly puzzled why they seem to 
cause
> the above code to operate incorrectly.
> 
> The above code seems to work ok whether Long only or Long and Short 
is
> set in the Settings box.
> 
> Any ideas?
> 
> Ken






Check AmiBroker web page at:
HYPERLINK "http://www.amibroker.com/"http://www.amibroker.com/

Check group FAQ at: HYPERLINK
"http://groups.yahoo.com/group/amibroker/files/groupfaq.html"http://grou
ps.yahoo.com/group/amibroker/files/groupfaq.html 






Yahoo! Groups Sponsor



HYPERLINK
"http://us.ard.yahoo.com/SIG=129fv75jh/M=294150.5475417.6555471.1269404/
D=groups/S=1705632198:HM/EXP=1096919057/A=2380089/R=0/SIG=12adlsi8e/*htt
p:/mortgages.interest.com/includes/server/icom_campaign.asp?id=10716" \n

HYPERLINK
"http://us.ard.yahoo.com/SIG=129fv75jh/M=294150.5475417.6555471.1269404/
D=groups/S=1705632198:HM/EXP=1096919057/A=2380089/R=1/SIG=12adlsi8e/*htt
p:/mortgages.interest.com/includes/server/icom_campaign.asp?id=10716" \n

 

     
 
Select Your State:  Alabama  Alaska  Arkansas  Arizona  California
Colorado  Connecticut  Delaware  Florida  Georgia  Hawaii  Idaho
Illinois  Indiana  Iowa  Kansas  Kentucky  Louisiana  Maine  Maryland
Massachusetts  Michigan  Minnesota  Missippi  Missouri  Montana
Nebraska  Nevada  New Hampshire  New Mexico  New Jersey  New York  North
Carolina  North Dakota  Oklahoma  Ohio  Oregon  Pennsylvania  Rhode
Island  South Carolina  South Dakota  Tennessee  Texas  Utah  Vermont
Virginia  Washington  Washington D.C.  West Virginia  Wisconsin  Wyoming

 HYPERLINK
"http://us.a1.yimg.com/us.yimg.com/a/bo/bon_marketing/x_100104.gif";
 Purchase   Refinance   
 HYPERLINK
"http://us.a1.yimg.com/us.yimg.com/a/bo/bon_marketing/x_100104.gif";



 HYPERLINK
"http://us.ard.yahoo.com/SIG=129fv75jh/M=294150.5475417.6555471.1269404/
D=groups/S=1705632198:HM/EXP=1096919057/A=2380089/R=3/SIG=12adlsi8e/*htt
p:/mortgages.interest.com/includes/server/icom_campaign.asp?id=10716" \n


 HYPERLINK
"http://us.adserver.yahoo.com/l?M=294150.5475417.6555471.1269404/D=group
s/S=:HM/A=2380089/rand=348872147"

 

   _____  

Yahoo! Groups Links

*	To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/amibroker/"http://groups.yahoo.com/group/
amibroker/
  
*	To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe"amibro
ker-unsubscribe@xxxxxxxxxxxxxxx
  
*	Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service. 


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004
 


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/