PureBytes Links
Trading Reference Links
|
At 3:22 AM -0500 1/12/98, WhisprWulf wrote:
>Does anyone know of software that would allow you backtest using a
>portfolio of stocks or futures? ( One of tradestations limitations is that it
>can only test one security at a time ). Any help appreciated,
>
I built a "system" that switched between 34 securities in TradeStation by
inserting all 34 prices as 34 data series. You then use, for example, a
loop to cycle through the data series.
for Index = 1 to 34 begin
if Close of data(Index) > Close[1] of data(Index) then ...
...
end;
You probably need to make the securities "Hidden" so they don't clutter up
the screen. With this many securities, I couldn't save the workspace as it
said it was too big to save.
Most built-in functions, such as Average, do not work properly since they
are built to sequence through successive bars of a single price. You have
to include the code for the functions you need in-line and use arrays to
save intermediate values for each security. For example, I needed a
function that used the past six values of a variable, so I needed to store
the variable in an array, such as "SValue[34,6]", and sequence through the
values with two loops, one for the 34 securities and one for the past 6
values.
You cannot use the internal buy and sell commands since they only work on
data1 so you need to program your own accounting and print everything using
print statements. You need to include a false buy signal to make the system
verify. I used
"if FALSE then Buy;"
You can, however, use the optimization functions to cycle through a range
of values if you send the results to the print log for manual inspection or
exporting to Excel.
In summary, it is very tricky and not without problems but it can be done
and allows you to use the price data collected in TradeStation.
Bob Fulks
--
Bob Fulks
bfulks@xxxxxxxxxxxx
|