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

Re: [amibroker] storing fundamentals and other data for each stock



PureBytes Links

Trading Reference Links

Hello,

If you are using Quotes Plus via plugin you can get most of fundamentals
using GetExtraData function:
http://www.amibroker.com/guide/afl/afl_view.php?name=GETEXTRADATA

 
> - is there any way to fill AB's Financial Results data from QuotesPlus data?
Not yet, but use GetExtraData instead.

> 
> - is there any way to make use of AB's Financial Results data with AFL? can
> it be used in indicators or backtests?

Yes. All fundamentals are accessible via AMiBroker OLE interface,
see properties of Stock object (Automation Object model section of the guide), 
as you can access OLE from scripting,
you can access them from AFL.

Example:

EnableScript("jscript");

ticker=Name();

<%

AB = AFL.CreateObject("Broker.Application");

AFL("income1")=AB.Stocks(AFL("ticker")).FinanceIncome(0);

AFL("income2")=AB.Stocks(AFL("ticker")).FinanceIncome(1);

AFL("income3")=AB.Stocks(AFL("ticker")).FinanceIncome(2);

AFL("income4")=AB.Stocks(AFL("ticker")).FinanceIncome(3);

%>

AddColumn(income1, "Income 1st quarter" );

AddColumn(income2, "Income 2nd quarter" );

AddColumn(income3, "Income 3rd quarter" );

AddColumn(income4, "Income 4th quarter" );

Filter=BarIndex()==BarCount-1;


> 
> - is there any way to set AB's Financial Results data procedurally using
> AFL?


Yes, the same way as shown above (properties of Stock object are writable)



> 
> - is there any other place within AB we can store custom data for a specific
> stock? ideally it would be per day, but a way to do that per stock over all
> bars would be better than nothing.

You can re-use existing fields (including OpenInt that is not used for stocks),
or you can use artifical ticker for that (say MSFT-DATA).

It is also possible to write a data plugin that will allow that. 

>   I know we can store it in our own files outside AB, and I know we can
> create pseudo-tickers to hold this kind of data. I'm wondering if it can be
> done within AB itself. if not, I'd like to formally make a feature request
> for user-defined fields that hold data per stock per bar.

One day this will be added but right now I am working on backtester enhancements.


Hope this helps.


Best regards,
Tomasz Janeczko
amibroker.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
ReplayTV: CNet Ranked #1 over Tivo!
Instant Replay & Pause live TV.
Special Sale: 50% off!
http://us.click.yahoo.com/UUMW7B/.5qGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/