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

Re: AFL



PureBytes Links

Trading Reference Links

Hi:

Is writing and reading .csv files by both AFL and the script language 
a feasible and simple way to communicate? 

With the advantage of also allowing us to write custom reports and 
interface with any other program?

Ion

--- In amibroker@xxxxxxxxxxx, "AmiBroker Support" <support@xxxx> 
wrote:
> Hi Ion and all,
> 
> > Question 1:
> > I understand scanning is a special function of AmiBroker that 
will 
> > apply a user written system at a certain date and report on the 
buy 
> > and sell signals on the group of stocks. Is my understanding 
correct?
> 
> Scanning and system tests are available from Automatic Analysis 
window
> (Menu Analysis->Automatic analysis)
> 
> > Question 2
> > Can a user written program in AFL also go through a user defined 
> > group of stocks and produce a report or write stuff to a file for 
> > each stock? For each bar? 
> Yes, you can write the formula
> (for example simple MACD system: buy = cross( macd(), 0 ); sell = 
cross( 0, macd() ); )
> and test it on all stocks or user-defined group of stocks.
> Test could include all bars, date range or defined number of most 
recent quotes
> The report will be generated with detailed statistics (Report 
button in Automatic analysis window)
> So in fact looping thru all stocks is built-in in Automatic 
Analysis window.
> (This is superior to Metastock which can test system only on stock-
by-stock basis)
> 
> > If not, can a script do this? Can the script execute a user 
written 
> > program in AFL and pass variables (such a stock ticker) to it? 
Can 
> > the AFL user written program return variables to the script?
> AFL and scripting are currently independent.
> AFL is intended for writing trading systems, indicators and 
commentaries
> Scripts are for performing database management tasks.
> 
> 
> > What I am ultimately trying to do is two things:
> > 1. Simply calculate the values of various indicators or 
combinations 
> > at various dates for a group of stocks and the returns of stocks 
in 
> > the group various dates later, in order to send to Excel and 
figure 
> > out which indicators have best predictive values how long into 
the 
> > future, using correlations and significant tests on correlations.
> You can do this right now. AmiBroker generates detailed statistics 
itself,
> no need to have Excel. But for Excel - an export of trade list to 
the CSV file will be available
> in the next version.
> 
> 
> > 2. Optimize a robust system over a group of stocks using the same 
> > parameters, indicators and exit and entry rules for every stock 
in 
> > the group. Then backtest the system on 4 or 5 other groups which 
I 
> > have not used during development. This robust optimization also 
> > requires loops over stocks, bars and variable parameters that 
will be 
> > stepped through, as well as input output capabilities.
> Optimization is planned for future releases of AmiBroker.
> 
> 
> > I suspect that AmiBroker can do the job because of its scripting 
that 
> > probably can do any number of loops that I may wish.
> > 
> > I looked at the AFL reference but did not find any looping 
constructs 
> > in AFL such as GOTO, DO, WHILE or whatever nor any INPUT-OUTPUT 
> > functions such as READ, WRITE, RETURN (var,...). Does it apply 
only 
> > to one graph? 
> > 
> > I also did not find any way that an AFL program can 
> > communicate with a script. Can it?
> Currently no, but I have some ideas to build the bridge between
> scripting and AFL. This would result in extremely powerful 
combination
> not available in any competitive product (AFAIK).
> 
> 
> Best regards,
> Tomasz Janeczko
> ===============
> AmiBroker - the comprehensive share manager.
> http://www.amibroker.com