FundValue (Function)

image\trumpet2.gif Disclaimer

The FundValue function returns the numeric value of the specified fundamental data from some number of periods ago.

Syntax

FundValue(FundFieldName,PeriodsAgo,oErrorCode)

Returns (Integer)

The function returns the numeric value of a specified fundamental data field from some number of periods ago based on a call to the reserved word GetFundData.  The oErrorCode output parameter returns a status code for the fundamental data request that should be checked after each use of FundValue to verify that the data was retrieved without error.

Parameters

Name

Type

Description

FundFieldName

String

Specifies the short name of the fundamental data to read.

PeriodsAgo

Numeric

Sets the number of periods ago from which to read the fundamental data.

oErrorCode

Numeric

Outputs the status of the fundamental data request.  If no error occurred a constant value of fdrOK is returned, otherwise a specific error code is set.  See reserved word GetLastFundDataError for a list of error codes.

Remarks

Fundamental data names are listed in tables under the following categories:

Snapshot, Balance Sheet Assets & Liabilities, Cash Flow, Income, Shareholder Equity

  All units, except share values, are converted to Millions for all periods.  Percentages are returned as whole values (i.e. a value of 26.5 represents 26.5% and not 2650.00%)

Typically, PeriodsAgo refers to a number of calendar quarters ago, since most companies report fundamental information (such as revenues and earnings) on a quarterly basis.  

You can also access fundamental data from other data streams using by adding an alias after the function, such as 'of Data2'

See About Fundamental Data in TradeStation for more information about using the fundamental data as part of your fundamental analysis.

See Multiple Output Function for more information on using output parameters to return values.

Example

Assigns Value1 the numeric value of fundamental data "ONET" (Net Income) from one period ago.  The status of the request is returned using the output parameter RetError.

vars: RetError(-1);

Value1 = FundValue("ONET", 1, RetError);

Assigns Value2 the numeric value of fundamental data "RNTS" (Net Sales) from three periods ago from an alternate data stream (Data2).  The status of the request is returned using the output parameter RetError.

vars: RetError(-1);

Value2 = FundValue("RNTS", 3, RetError) of Data2;

See Also

FundBoolean, FundDate, FundString