10.5.09

Cập nhật thông tin cơ bản vào amibrocker

SYNTAX GetFnData("field")
RETURNS NUMBER
FUNCTION GetFnData allows accessing fundamental data from Information window (View->Information) "field" parameter can be one of the following:
  • "EPS"
  • "EPSEstCurrentYear"
  • "EPSEstNextYear"
  • "EPSEstNextQuarter"
  • "PEGRatio"
  • "SharesFloat"
  • "SharesOut"
  • "DividendPayDate"
  • "ExDividendDate"
  • "BookValuePerShare"
  • "DividendPerShare"
  • "ProfitMargin"
  • "OperatingMargin"
  • "OneYearTargetPrice"
  • "ReturnOnAssets"
  • "ReturnOnEquity"
  • "QtrlyRevenueGrowth"
  • "GrossProfitPerShare"
  • "SalesPerShare"
  • "EBITDAPerShare"
  • "QtrlyEarningsGrowth"
  • "InsiderHoldPercent"
  • "InstitutionHoldPercent"
  • "SharesShort"
  • "SharesShortPrevMonth"
  • "ForwardDividendPerShare"
  • "ForwardEPS"
  • "OperatingCashFlow"
  • "LeveredFreeCashFlow"
  • "Beta"
  • "LastSplitRatio"
  • "LastSplitDate"
EXAMPLE AddColumn( Close / GetFnData( "EPS" ) , "Current P/E ratio" );
AddColumn( Close / GetFnData( "EPSEstNextYear" ) , "Est. Next Year P/E ratio" );
Filter = Status("lastbarinrange");
SEE ALSO GetRTData() function , GetRTDataForeign() function

References:

The GetFnData function is used in the following formulas in AFL on-line library:

    More information:

    Updated on-line reference

    IMPORTING FUNDAMENTAL DATA FROM OTHER SOURCES

    AmiBroker allows also to import fundamentals using its flexible ASCII importer and/or OLE interface as all new fields are exposed as properties of Stock object.

    ASCII importer $FORMAT command now supports the following extra fields for fundamental data:

    DIV_PAY_DATE
    EX_DIV_DATE
    LAST_SPLIT_DATE
    LAST_SPLIT_RATIO
    EPS
    EPS_EST_CUR_YEAR 
    EPS_EST_NEXT_YEAR 
    EPS_EST_NEXT_QTR 
    FORWARD_EPS 
    PEG_RATIO 
    BOOK_VALUE (requires SHARES_OUT to be specified as well)
    BOOK_VALUE_PER_SHARE 
    EBITDA 
    PRICE_TO_SALES (requires CLOSE to be specified as well)
    PRICE_TO_EARNINGS (requires CLOSE to be specified as well)
    PRICE_TO_BV (requires CLOSE to be specified as well)
    FORWARD_PE (requires CLOSE to be specified as well)
    REVENUE 
    SHARES_SHORT 
    DIVIDEND 
    ONE_YEAR_TARGET 
    MARKET_CAP (requires CLOSE to be specified as well - it is used to calculate shares outstanding)
    SHARES_FLOAT 
    SHARES_OUT 
    PROFIT_MARGIN 
    OPERATING_MARGIN 
    RETURN_ON_ASSETS 
    RETURN_ON_EQUITY 
    QTRLY_REVENUE_GROWTH 
    GROSS_PROFIT 
    QTRLY_EARNINGS_GROWTH 
    INSIDER_HOLD_PERCENT 
    INSTIT_HOLD_PERCENT 
    SHARES_SHORT_PREV 
    FORWARD_DIV 
    OPERATING_CASH_FLOW 
    FREE_CASH_FLOW 
    BETA

    Note that if you want to import only fundamental data with ASCII importer (without quotes) you need to use $NOQUOTES 1 command. See Formats\aqfe.format and Formats\aqfn.format files for example usage - these are files actually used by AmiQuote to implement automatic import of fundamental data downloaded from Yahoo.

    The names of extra properties of Stock object are the same as used by GetFnData function and they are listed in detail in OLE objects reference.

    No comments:

    Post a Comment