Help By Topics

Absolute Value – the absolute value is the numerical value without considering whether the number is positive or negative.  The syntax is ABS [data].  If you wanted to study the volatility of the changes in data without regard to whether the changes were positive or negative, then ABS CHANGE [data] will produce the desired result.

What does “Adaptive” Mean?Essentially it means that a parameter of the function (that is a number used by the function) can vary with time. Let us give a real example:
Suppose you are performing an operation on a data series, such as taking a moving average of the data. Normally you would specify the time period over which you would be performing this operation, as for example a 10-day moving average or a 20-month moving median, etc. The time period (i.e. 10 days or 20 months) is your variable.

Now suppose that what you are doing demands performing this operation over different time periods under different circumstances. In other words, you need to vay that is the number of days over which you take the moving average. Most software operations are set up to deal with user-defined parameters that do not change. So what you need is software that can perform such operations with non-constant or adaptive input. In theory this should not be a big deal. But it is, because most software cannot deal with such a request.


Let's go back to the example of a 10-day moving average. Instead of specifying 10 MOVAVE BONDS you will replace the 10 with another dataset (say, [data2]), whose dates correspond to the Bond dataset, and whose entries are integers, specifying how many days to use in the moving average, on each date.. Operationally you would then request [data2] MOVAVE BONDS Thus, on each date, FDC would look to the value in [data2] MOVAVE BONDS to perform the appropriate moving average on Bonds.

For another example, suppose you are trading the Treasury Note futures contract and need to adjust your smoothing of the data by some measure of how excited the market is. You have decided that the Open Interest divided by the Daily Volume is a good measure of that excitement. So you create a dataset by dividing the Open Interest by the Volume (and maybe add a minimum constant), and use that dataset to operate the moving average, or other data smoother. Thus, when there is high Volume relative to the Open Interest, the data smoother will shorten-up. Conversely should the market activity slow down, the smoother will look at the price data over a longer period of time.

Ahead – the opposite of Back.  This function moves a Dataset ahead in time. The syntax is [data] AHEAD N (where N is a positive integer). Should you be studying whether one Dataset will either lead or lag another, you will need to first compare them. For example, economists consider the stock market a leading indicator that leads the economy by six months.


[economic data] WITH (STOCKS AHEAD 6) will put the two items in the same Dataset with a common date. You could test the correlation between the indicators and stocks and learn whether the two data series were better correlated with say a 4 or a 6-month lead. GOLD WITH (SILVER AHEAD 5) is the same as [data] SILVER WITH (GOLD BACK 5) , except the date displayed will always be that of the first Dataset mentioned.


N may also be a dataset, which means that the function can be adaptive; that is it can have a different integer on each date. Should N be a one-column dataset, AHEAD will move the data for each date ahead the number of periods specified by N for that date. Should N be a dataset of several columns, it will operate on the other dataset according to the standard rules for matrix operations.


It is possible for N to be a negative integer. In such a case, [data] AHEAD -2 is equivalent to [data] BACK 2. Also, if N is not an integer, it will be replaced by the closest integer. These rules hold so that one can freely use the output of another function as N, a process that is often necessary when computing adaptive indicators.

Alldates – as in “find all dates between date1 and date2”.  Syntax is ALLDATES [date1] [date2] .  Alternatively, the function can be used in the form
[dataset] ALLDATES [date1] [date2] . In this form all dates during the time period covered by [dataset] are added to the dataset, with blank data used on any extra dates.
This function can be of tremendous help in data cleaning since you can easily identify when data is absent, that is you can then identify the “holes” in your Dataset.

Allwkdates – functions identically as ALLDATES, but produces or inserts only the week dates (market trading days).

And – one of the logical functions of FDC, similar to OR and NOT, which examines two logical series and expresses a value of 1 (meaning that both logical series were true) or 0 if neither or both were false.  For example:

((HI BONDS) = (CL BONDS)) AND ((DW BONDS) NE FRIDAY)

will yield a 1 when BONDS closes on its high on any day other than Friday.  Also,

BONDS WHEN (((HI BONDS) = (CL BONDS)) AND ((DW BONDS) NE FRIDAY))

will display the entries of the Dataset BONDS when those conditions occurred.

Arccosine – a trigonometric function equal to the inverse of the cosine.  The syntax is ARCCOS [data].  Should you wish the hyperbolic arccosine, the syntax is ARCCOSH [data]

Arcsine – the inverse of the sine.  Syntax is ARCSIN [data].  Hyperbolic arcsine is ARCSINH [data]. 

Arctangent – in inverse of the tangent.  Syntax is ARCTAN [data].  Hyperbolic arctangent is ARCTANH [data]. 

Attach – Syntax is [ordinal dataset1] ATTACH [ordinal dataset2].  Combines two ordinal datasets, one after the other, and renumbers.

Attachall – Syntax is ATTACHALL [ordinal dataset1] [ordinal dataset2] ... [ordinal datasetn].  Combines any number of ordinal datasets, one after the other, and renumbers.

Ave– synonym for TOTAVE

Back –the opposite of AHEAD. This function moves a Dataset back in time. The syntax is [DATA] BACK N (where N is a positive integer). SILVER WITH (GOLD BACK 5) is the same as GOLD WITH (SILVER AHEAD 5), except the date displayed will always be that of the first Dataset mentioned.

N may also be a dataset, which means that the function can be adaptive; that is it can have a different integer on each date. Should N be a one-column dataset, BACK will move the data for each date back the number of periods specified by N for that date. Should N be a dataset of several columns, it will operate on the other dataset according to the standard rules for matrix operations in this section.

It is possible for N to be a negative integer. In such a case, DATA] BACK -2 is equivalent to DATA] AHEAD 2 . Also, if N is not an integer, it will be replaced by the closest integer. These rules hold so that one can freely use the output of another function as N, a process that is often necessary when computing adaptive indicators.

BarsApplies to a daily FDC dataset that has times in the first column, and turns that dataset into bar data.

Bin Organize the data into this many bins (or buckets, tranches or pigeonholes), and value each as described. The syntax is [sequence of numbers] BIN [data] such as 3 5 7 10 BIN VOLUME msft. In this example, there are four numbers in the left argument. That means that the entire dataset will be divided up into four equal bins based on the range of the data in the dataset. Then each entry will be given the value you have assigned to that bin.  For example, let’s assume there are 100 days of data in your dataset VOLUME msft, which consists of the daily volume of shares traded for that stock. The BIN function examines the volume figures in the dataset, dividing the data range (high volume minus low volume) into quartiles. Those figures in the lowest quartile get assigned a value of 3, the next highest getting assigned a 5, the next highest a 7, and the highest quartile a 10. The output dataset contains only dates and the values 3, 5, 7 and 10. This function can be used, for example, to turn the values of an indicator into integers for an adaptive moving average.
Note that in the above example the function divides the range of the data into equal segments, not the number of actual entries. If the data were distributed uniformly over the range, you would expect each bin to contain 25 entries. However it is more likely that the data will be distributed normally over the range (like a bell-shaped curve), in which case more data would fall into the middle bins than either the highest or lowest bin.


The left argument can be tailored as you wish. A request such as
0 0 0 0 3 BIN TEMP 1 will divide the data into 5 equal tranches, all of which will get a zero value, except those in the highest quintile, which will be valued as 3. Thus this function provides you with a method of discretely weighting data.

As with the weighted functions, BIN does not follow the standard rules for matrix operations, but applies the left arguments to each data item of each column. Columns may have different ranges, and the range of each column is used in the computations for that column.

BoxSynonym for Bin

Break - The syntax is [logical dataset] CHANGE [dataset]. The two datasets have identical sets of dates. The second dataset is broken into pieces beginning at each 1 (TRUE) in the first dataset. All the pieces display.

Change – The current data entry minus the previous data entry.  In stock market terms, today’s price minus yesterday’s price.  The syntax is simply CHANGE [data].  This function operates identically to [data] MINUS ([data] BACK 1). You can optionally provide a left argument and use the function in the form
N CHANGE [data].
The result is (for each date) today's entry minus the corresponding entry N days ago.

Channel – The syntax 20 CHANNEL [data] identifies a trend and creates a channel around the trend.  The upper value of the channel will be 20 points above the trend, and the lower value will be 20 points below the trend.  That is, the channel will have a width of twice the N value expressed.

Chdir Change the current active directory. Syntax is chdir string, where string is the address of the new directory.

Cleaning of data – see the examples given in ALLDATES and “horizontal functions”.

Clear – In the command window, drop down the edit function and you may clear a line, or lines.

Clipboard– This function takes any ASCII data that has been copied to the system clipboard, and then translates it into fdc form and returns the corresponding dataset. It can also be invoked by presing the clipboard icon . The clipboard function can be combined with other functions to make useful macros.

Example: The command line [data1] GETS CLIPBOARD MERGE [data1] (where [data1] is a stored dataset) waits for you to copy data to the clipboard and press the clipboard icon. It then merges that data with [data1].  (adding any new data and overriding any data you wish to change).  The result is then stored in place of the original [data1].  Effectively you have used the clipboard to overwrite and/or update the original dataset.

Close – Syntax is CLOSE [data], or CL [data].  In market terminology the close is the last price of the day.  In various futures markets it will also be called the settlement value.  As the closing price is the value by which margins are determined, much research shows it to be the most significant value of a given day.  If your Dataset has 4 columns of data, FDC will automatically assume the closing price will be the fourth column, as it is common usage to list the prices in the order of open, high, low and close.  Thus in a 4-column Dataset, CLOSE BONDS is synonymous with BONDS COLUMN 4.  Likewise, in a 3-column Dataset, it is conventional to assume the third column to be the close.  Therefore, in a 3-column Dataset, CL EURO is synonymous with EURO COL 3, or EURO COLS 3.

Cl – Synonym for Close.

Cmd – Issue a dos command from the command window - Syntax is cmd [string], where string is the complete DOS command.

Cmdplay – Load in a command set and run it. - Syntax is cmdplay [name], where name is the name of a command set in the main FDC directory, or the complete path of a command set.

Cmdplaylist – Load in a list of command set names, and load and run these command sets in succession. - Syntax is cmdplaylist [name], where name is the name of a list in the lists subdirectory of the main FDC directory, or the complete path of a list.

Column – Should you wish to specify data that appears in your Dataset in a particular column, you may ask for it with [data] COLUMN 4.  You may also ask for multiple columns with SNP COLUMNS 2 3 4, noting that there are spaces between the numbers.  To abbreviate, you may choose to use the equivalents COL or COLS.  Also see “Dropping columns”. If you use a dataset on the right, it allows you to select different columns each day. The dataset on the right should contain, for each day, the numbers of the columns to be selected, in the order desired.

Comma – a synonym for WITH.

Common – Functions like WITH, but instead of combining all columns of the left Dataset with all columns of the right Dataset, COMMON combines the Datasets only on dates that both sets have in common.  Syntax is [data A] COMMON [data B].

Consecutive  – The function CONSEC applies to any logical series, and produces a numerical output.  If the series to which it is applied is false on a given day, then CONSEC returns 0.  If it is true, but was false on the previous day, then CONSEC returns a 1.  If the result is true for the third straight day, CONSEC returns a 3, and so on.  This is similar to the behavior of the functions UPRUN and DOWNRUN.  In fact, the command UPRUN (CL GOLD) is completely equivalent to the command CONSEC ((CHANGE GOLD) > 0).

Correlation – The syntax is  [dataA]  COR  [dataB] .  There are several ways to correlate datasets.  The total correlation of one dataset to another is done by COR (or TOTCOR).  You can perform a cumulative correlation by requesting CUMCOR.  And you can do correlations on moving sections of data with MOVCOR.  In the latter case the syntax is 25  A  MOVCOR  B, where 25 represents the number of periods being studied, and A and B represent the datasets being correlated.

Covariance – The syntax is  [dataA]  COV  [dataB] .  There are several ways to calculate covariance of datasets.  The total covariance of one dataset with another is done by COV (or TOTCOV).  You can perform a cumulative covariance by requesting CUMCOV.  And you can do covariances on moving sections of data with MOVCOV.  In the latter case the syntax is 25  A  MOVCOR  B, where 25 represents the number of periods being studied, and A and B represent the datasets being correlated.

Cosine – a trigonometric function.  The syntax is COS [data].  Should you wish the hyperbolic cosine, the syntax is COSH [data].

Count – Used within a loop playing in a command set. If the dummy variable is #1, for example (1 can be replaced by 2, 3, 4, 5, 6, 7, 8, or 9), then COUNT 1 will give the current value of that variable at any time, that is the count of the loop indexed by #1.

Creation of new Datasets If you are looking to create a new dataset, then either type CLIPBOARD in the command line, or click on the Clipboard icon.  Should you wish to create a new dataset from another dataset, then use the GETS function.

Crossup or Crossdown – These are very useful shortcut functions that identify specifically the event of one Dataset going from negative to positive (crossup) with regard to its relationship to another Dataset.  The syntax is [data A] CROSSUP [data B], and the output will be a logical series (true/false or 1/0), with a value of 1 on any day a crossup occurs, and a value of 0 on other days.  For example, normally the 3-month treasury bill yields less than the 10-year treasury note.  In a tight credit market, however, the markets move to an inverted yield curve, with the bill yielding more than the note.  Should you wish to identify the event of the inversion, request BILLS CROSSUP NOTES.  Note that this request will produce only the crossovers.  To identify the entire period of inversion, simply request BILLS > NOTES, or BILLS GT NOTES.

Cumulative functions – You may wish to perform certain operations on data from the beginning of data collection.  In all of the functions the syntax is CUMfunction [data].  For example, you may want to know the highest value the data has ever achieved to date.  In that case you would simply request CUMMAX [data].  There will be an entry for each date.  If the data has four columns, then the output will likewise have four columns, with the cumulative maximum displayed for each date and each column.

CUMCOR displays the cumulative correlations between datasets A and B.  The syntax is [dataA]  CUMCOR  [dataB].
CUMCOV displays the cumulative covariances between datasets A and B
.  The syntax is [dataA]  CUMCOV  [dataB].
CUMMIN works similarly.
CUMMATCH (see MATCH)
CUMMEAN and CUMAVE are equivalents for the cumulative average.
CUMMED computes the middle value or median.
CUMPROD displays the cumulative product.
CUMQUANTILE computes a cumulative quantile. A k% quantile is a number such that k% of the target numbers are below it and 100-k% are above. It is a generalization of median, in that the median is the 50 quantile. The syntax is Q CUMQUANTILE [dataset], where Q is the quantile.
CUMSTDV computes the cumulative standard deviation.
CUMSUM computes, for a given date, the cumulative sum of entries from the beginning of the data up to that date.
CUMAND and CUMOR take the sum of the logical series AND and OR.  Think of them as “CUMSUM AND” and “CUMSUM OR”.
CUMVAR computes the cumulative variance of a dataset.

Cycles – Cycles are an integral part of time series analysis.  We have prepared a cycles demo dedicated specifically to cyclic analysis, and encourage reviewing it.  The syntax is, N CYCLERUN [data], where N is the number of cycles you wish to examine.  The point here is that you want to examine meaningful cycles, and not force the function to identify random noise as cyclic behavior.  When you use the function an FDC note will identify for you the critical information such as periodicity and the percentage of behavior explained by each cycle.

Should you wish to force a particular cycle on you data, request N CYCLE [data], where N represents the cycle length (periodicity).  The output will be the best possible n-period cycle.

Data - To quickly discover which Datasets you have stored, just go to your drop down File menu, and select Data Wizard.  It will show you a list of activated Datasets.  You may then select them and press the Open Data Set button.  The Datasets will open, and a record of them will be recorded in the current command window. Alternatively,

Datasets – FDC works on Datasets, which usually means dated series of numbers.  Please see the Datasets section of the User’s Guide.

Data cleaning – see the examples given in ALLDATES and “horizontal functions”.

Date, Dates – If you request DATE [data] you will receive output identical to the dates for each entry.  That can be particularly useful as part of a pattern selection process, or to quickly identify events.  For example, DATE SNP WHEN ((HI SNP) = (CL SNP)) will identify the date when the S&P closed on its high.  Dates will be in the format YYMMDD.

Date removal – See SEQUENCE to remove dates and have the data listed sequentially or as ordinals.

If you are missing a date (i.e.  you have a hole in your data set), you may wish to fill it with the DATEINTERP function, which will interpolate missing dates and their interpolated values.  The syntax is DATEINTERP [data].  Should you only wish to supply missing weekdates (i.e.  the days markets are open), then use the WKDATEINTERP function, which operates similarly to DATEINTERP, but supplies only the missing weekdates.  In either case, be cautious of what you request, or you may get more than you bargained for.  Our suggestion is to limit the interpolation functions by date as in:  DATEINTERP BONDS FROM 990101 TO 990601.

Day, Day of the Week, Day of the Year

DAY EURO or DAYS EURO will provide you with the day of the month for each entry in that Dataset.  If for example there is any data for July 18th, 2001, the request will give you a single column of data in which the entry for July 18th 2001, will be 18. 

DAYOFWK EURO or DW EURO will identify for you the day of the week in numerical form.  Should you not remember that Monday is 1, then the FDC note will give you that information.

DAYOFYR EURO or DY EURO will identify for you the day of the year in numerical form.

DayssinceDAYSSINCE date will return the number of calendar days between the specified date and today's date, inclusive. It returns a sincle constant.

Deferred functions certain functions are delayed, pending more information.  One example is CATALOG, which causes the command line to pause execution until the appropriate data or dataset is entered. Another deferred function is PARABOLIC.  When this function is present (one or more times) in a command line, execution pauses until a parabolic prediction is generated.  If this is done and if the user then chooses to save all or part of the resulting data, then that data is substituted for the word PARABOLIC and execution continues.

Delay – Delay execution (of a command set) a certain number of seconds, minutes, or hrs.(See Time delays)

Delete – Used within a command set running automatically. It deletes a previously computed dataset (displayed or hidden) from the playlist, closes its window, and deletes it altogether if it is temporary. (See also lastitemname)  

Another example is PARABOLIC.  When this function is present (one or more times) in a command line, execution pauses until a parabolic prediction is generated.  If this is done and if the user then chooses to save all or part of the resulting data, then that data is substituted for the word PARABOLIC and execution continues.

Diff  - Used only with lists, this function produces a list containing all items in the left list but not the second. Syntax is [left] DIFF [right] where the left and right arguments are each either names of lists in the List subfolder of the main FDC folder, with quotes around the name, or actual lists, usually produced by other list manipulating functions.

Divide – Equivalents are DIVIDE, DIV or / .  The syntax is A DIV B and can be interpreted in English asA divided by B.” A and B can be data sets or numerical values.  If either A or B are Datasets, be mindful that the Datasets are matrices, and the normal mathematical rules for matrix operations apply:  One against many, many against one, and equals against equals.  If you are not familiar with such mathematical rules, please review the description of mathematical functions in the Basic Tour of FDC commands in the User’s Guide.

Occasionally you may wish to perform a division and need the output to be integers.  In that case, use the integer divide function INTDIV.  The output of 7 INTDIV 3 is 2.

Downday, DownrunDOWNDAY [data] will give you values of 1 when the change is negative from the previous entry, and values of 0 when it is not.  DOWNRUN [data] will give you a 0 when the value is greater or equal to the previous data, but positive values for each consecutive down value.  The first down data entry will earn a value of 1, with the next value (if down) earning a 2, etc.  The opposites are UPDAY and UPRUN.

Dnldprimate –Facility to batch download a list of datasets from Primate.

Dropfirst, DroplastAs in, “drop the first part of the Dataset”. Let’s suppose that you want to ignore some data entries at the beginning of a Dataset: The request [data] DROPFIRST 100 will remove the first 100 entries. The function DROPLAST works similarly.

Dropping columns – Equivalent to “not columns”.  Suppose you have a 4-column Dataset and you wish to drop one of the columns.  For example, the DJIA has columns identified as the open, high, low and close.  If you just want the high, low and close, then request DJIA DROPCOLS 1.  Should you have a 10-column Dataset, and wish to drop columns 3, 4 and 9, then request [data] DROPCOLS 3 4 9 (note the spaces between the numbers).  The opposite of DROPCOLS is COLS.  Note that requesting DJIA COLS 2 3 4 will produce identical output as DJIA DROPCOLS 1.

DuringAs in “give me the dataset XYZ during the month of June.”  You can also use the alias IN.  The syntax is [data] DURING date1 date2 .  The dates can be years, months or days.  Note that you may also request something like MARCHOIL DURING MAYOIL, where MAYOIL is a regular dataset.  In the latter example you will get the data series MARCHOIL when and only when there are entries in the MAYOIL dataset, without necessarily knowing in advance what those entries were.  The function ON works similarly.  Note also that you can use the FROM and TO functions to also select data by date.

Equals – equivalents are EQ and “ = “.  This is a logical function, which like other logical functions produces a value of 1 when true and a value of 0 when false.  Its best use is in combination with other functions to describe patterns.  For example,

SNP WHEN ((HI SNP) = (CL SNP)) will provide the entries of the S&P Dataset when the S&P closed on its high.

Exponents - The function EXP takes the natural exponent of each data entry.  The function EXP10 raises 10 to the power given by each data entry.

Exponential moving averages – The syntax is N EXPAVE [data]. We have written this function to be smart enough to know what you are thinking. Should you give N a value between 0 and 1 (for example, .7 EXPAVE BONDS) you will receive an exponential moving average for Bonds in which each entry is created by averaging 70% of the previous days calculation with 30% of the current days. Because of the recursive nature of the calculation of exponential averages, the entire body of previous data is essentially used to determine each new value. Thus the expression x-day exponential moving average” is a misnomer. However, although it is a misnomer, we recognize that many in the industry use the days method of describing exponential smoothing. Accordingly, should you give N a value greater than 1 (for example, 12 EXPAVE BONDS) FDC will assume that you mean 12 days, and make the appropriate calculation. 

We have provided a table of N values that will enable you to calculate the x-day exponential moving average mentioned in various formulae. That table can be found in the Exponential Smoothing Supplement. If you are not familiar with exponential averages, please review the description of them in the Basic Tour of FDC commands in the User's Guide.

As with the moving functions, the left argument can be a dataset, which will have the result of making the EXPAVE function adaptive. However, you are cautioned to be consistent: the values for N in that left argument dataset should either all be below 1 or above 1. Also, be mindful of the standard rules for matrix operations in this section.

Exporting data – you can copy data from any displayed “.fdc” Dataset and paste to Excel® or to a word processing program.  You can also convert any saved “.fdc” Dataset to ASCII form.  To do this use the Convert tool (the Ruler icon) on any command window, and follow the simple instructions.

Extendalldates, Extendallwkdates Syntax: EXTENDALLWKDATES  [data] . These functions align everything correctly in time, supplying all missing dates (on which there is no data), such that you can see exactly what is missing in the dataset. By using the EXTENDALLWKDATES function on a dataset, the output will identify all weekday entries on which there is data missing. The data might be legitimately missing, such as on a holiday, or it might be a hole in your data that needs input. EXTENDALLDATES inserts all dates, even the weekends. In effect this is the same functionality as that of ALLDATES  and ALLWKDATES, used with left argument. However, the the present functions apply to an entire dataset, as opposed to applying only to the data during a fixed period of time.

Extending calculations – any data that has a mathematical formula can be extended.  This means that trends, channels, cycles, among others can all be extended into the future.  With the EXTEND function you are now in the business of forecasting.  This is not crystal ball forecasting, but extension of data based on mathematical formulas that you have assumed properly describe past data.  There’s a lot of wiggle room in that statement, and you should be most cautious about what you extend.  The syntax is [data] EXTEND N, where N is the number of periods you are extending into the future.  On your Dataset (and graphs) the dates describing the extension will be numbered as #1, #2, #3 . . .  We have prepared an extend demo dedicated to this important function.

FirstAs in, “first part of the Dataset”.  Let’s suppose that you only want to look at the first part of a Dataset.  Instead of requesting [data] FROM 990101 TO 990601 you may simply want to request the first 100 days:  [data] FIRST 100.  The function LAST works similarly.

FlipUsed only on lists. The syntax is FLIP [list] , where list is the name of a list in the list subfolder of the FDC folder, surrounded by quotes, or is an actual list, produced by other functions that operate on lists.

Friday – It is possible in your research that days of the week are important.  FDC gives you the ability to describe the days by name.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ FRIDAY) will yield a 1 (true) when BONDS closes on its high on a Friday.  Also note that in the Weekly functions (e.g., WKAVE, WKMAX, etc.) the date displayed will be the Friday date, unless there is no data for Friday.  In the case where there is no Friday data (i.e.  a holiday), then FDC will use the next earlier date on which there is data.

From – As in, “from this date” or “from date A to date B”.  This date delimiter can either be used alone (e.g., STOCKS FROM 990101), or in tandem with the TO function (e.g., BONDS FROM 990101 TO 990601).  If you do not limit the ending date by using TO, then FDC will assume that your request is for the Dataset through to its completion. 

Gets – for the creation (and saving) of new Datasets from the Command line.  The GETS function is an “on-the-fly Save As”.  The syntax is [new Dataset] GETS [your definition].  Note that your definition can be as complex or as simple as you desire.  The Dataset produced by the commands in [your definition] is then saved in the default data folder under the new Dataset name.  Be aware that if there is already a Dataset by that name stored there, it will be overwritten. The main use of this function is in a command line, where it can be part of an automatically executed set of command lines. The function GETS does not display the dataset being saved, but this can be done by using a related function SHOWGETS.

In the course of normal operations, FDC creates new temporary Datasets each time you perform an operation.  They are named TEMP1, TEMP2, TEMP3, etc.  Temporary Datasets are in the volatile memory and continue to exist until you either close out of FDC, close the command window that created them, or close the Datasets themselves.

If you enter RESET in a command line, the next temporary Dataset produced will be called TEMP1, and numbering will then increase from 1.  One reason for the reset capability is that you may in the course of your research get a large number of temporary Datasets.

When you use the GETS function, the result of the computation is not displayed, it is just stored.  Should you wish to make one of the volatile temporary Datasets (say TEMPn) permanent, you can enter [new Dataset] GETS TEMPn.  You can also simply use the SAVE command on the Dataset window.

Getdata – The command line function that duplicates the function of the data wizard. Use the data wizard, and it will automatically place the equivalent 'getdata' expression on the command line for you.

Greater than, Greater than or equal to - GT and GE , or you may use their mathematical symbols “>” and “>=”.  These are logical functions, which like other logical functions produces a value of 1 when true and a value of 0 when false.  The best use is in combination with other functions to describe patterns.  For example,

DATE TBILLS WHEN (TBILLS GE NOTES)

will provide the entries of the TBILLS Dataset when the Tbill yield is higher than the Note yield (i.e., when the yield curve is inverted).

Groups of data – the “Group” functions.  Should you wish to group your data into bundles of n days, use the Group functions.  For example, should you wish to look at “10-day auto sales”, FDC will start at the beginning of your Dataset, and select the first 10-day period and date it with the 10th date.  Then it will do the same for the 11th through 20th entries, and date the output with the 20th date.  The Weekly, Monthly and Yearly functions group by date.  The Group functions look at the data in sequential bundles from the beginning of your selected Dataset.  The syntax is N GROUPfunction [data], where N is the number of raw entries being selected for the bundle or group.  You may use a dataset in place of N. In this case it should be an ordinal dataset with one column, consisting of integers adding up to the number of rows in data. This allows groupings of variable size.

GROUPAVE computes a group average or mean
GROUPBARS makes bar chart data by computing the group open, maximum, minimum, and close, then arranging labels and charting.
If no open is available, it computes the synthetic bar chart data without opens.
GROUPCLOSE computes a group 'close' by choosing the last entry in each group.
GROUPMAX computes the group maximum.
GROUPMIN computes the group minimum.
GROUPOPEN computes a group 'open' by choosing the first entry in each group.
GROUPPROD computes the group product.
GROUPSUM computes the group sum.

Hide – Syntax is HIDE [computation resulting in a dataset]. Example:

HIDE 3 MOVAVE ((HIGH IBM) + (LOW IBM))/2

The resulting computation is performed, and stored under whatever name is appropriate (often 'Tempk', for some integer k), but it is not displayed. This is illustrated by the fact that the stored name, appearing as a label on the command line, is in gray, not brown. If you place the cursor on the corresponding command line after execution, the F11 key will toggle back and forth between displayed mode and hidden mode. If the default display option (set with the 'options' menu) is 'HIDE', then all computed datasets are hidden, and it is not necessary to use the command HIDE in a computation. If the display option is 'SHOW', meaning display all computed datasets as usual in their own windows, the command HIDE' on a command line will override the default.

Hiding datasets is useful to suppress the display of a confusingly large number of windows. It also speeds up the computations by a factor of 10 or more. In addition, the windows graphics memory is fixed in size (not related to the amount of ram you have), and if it fills, then an appropriate error will be generated and you will not be able to display anymore graphics windows until some are closed. This the hidden option is the only way to do a larege number of successive computations with large datasets (particularly with the automatic play button).

High – Syntax is HIGH [data], or HI [data].  It performs similarly to CLOSE, OPEN and LOW.  In market terminology the high is the highest price of the day.  If your Dataset has 4 columns of data, FDC will automatically assume the high price will be the second column, as it is common usage to list the prices in the order of open, high, low and close.  Thus in a 4-column Dataset, HIGH BONDS is synonymous with BONDS COLUMN 2.  Likewise, in a 3-column Dataset, it is conventional to assume the first column to be the high.  Therefore, in a 3-column Dataset, HI EURO is synonymous with EURO COL 1, or EURO COLS 1.  If you are looking for the cumulative high, refer to CUMMAX in the cumulative functions.  If you are looking for the “all-time high”, refer to TOTMAX in the “TOT” functions.

Horizontal functions – In a time series, the typical operation is performed vertically.  However there can be occasion to operate horizontally across the data columns, sometimes just as a shortcut.  The Horizontal functions enable such operation.  HAVE averages the columns.  HAVE [data] would certainly be a shortcut compared to

(([data] COL 1) + ([data] COL 2) + ([data] COL 3)) DIV 3

HDIFF would give you the difference between the first and second column. Use only on datasets with exactly two columns.
HMAX would give you the highest value horizontally.
HMIN works similarly.
HSUM computes, for a given date, the sum of entries across the columns.
HPROD displays the horizontal product.

One of the first steps that any data researcher should perform is a test of the validity of the data.  In short, is the data “clean?” In determining such, a typical operation is to see if there are any prices higher than the high, or lower than the low.  The following entry will easily do just that: 

[data] WHEN ((HMAX [data]) GT (HI [data])) OR ((HMIN [data]) LT (LO [data]))

Should you frequently import unreliable data, it would be most advisable to make a macro out of this operation and others.  Other functions, such as ALLDATES can also be effectively used to clean data.

Hyperbolic functions – Syntax is SINH [data].  These functions are:

SINH - hyperbolic sine
COSH - hyperbolic cosine
TANH - hyperbolic tangent
ARCSINH - hyperbolic arcsine
ARCCOSH - hyperbolic arccosine
ARCTANH - hyperbolic arctangent

In – a selective date function.  Syntax is [data] IN 1999.  Returns that part of the data (if any) that lies in the year specified.  See also During.

Integer – the integer division function.   Syntax is N1  INTDIV   N2, where N1 and N2 can be either numbers or datasets. In this operation, the largest whole number is returned after N1  is divided by N2. For example, the result of   7  INTDIV  3  is 2.

Interpolation of data.  - A Dataset may have certain dates on which some of the columns have data and some columns are missing data.  On such dates we will say that the data has “holes” in it.  These may be intrinsic to the data or may have resulted from combining Datasets that have different sets of dates.  In either case, if there is no easy way to replace the missing data, FDC can interpolate between the last real data point in the column where the hole appears and the next real data point.  It will fill the holes either by linear interpolation, or by extending the leftmost value ('linear' interpolation or 'stepwise' interpolation).  INTERP fills in missing data into dates that are already part of the Dataset.  If you started out with a Dataset of 100 days, you will end up with a Dataset of the same length.  Syntax is type INTERP [data], where type is either 'linear' or 'step' (include the quotes).

This should not be confused with the function DATEINTERP.  The function DATEINTERP finds the first and last date of a Dataset, determines all intermediate dates on which there is no data, and fills in these dates with synthetic data determined as in INTERP.  DATEINTERP fills in missing dates and creates interpolated data for those missing dates.  That is, your initial Dataset could have been 100 days, but DATEINTERP will fill in the missing dates and data, possibly resulting in a Dataset of a greater length. It also uses either type of interpolation described above. Syntax is type DATEINTERP [data].

A similar function, with identical syntax is WKDATEINTERP. This function adds only week dates, skipping weekends

.Intersect  - Used only with lists, this function produces a list containing all items common to two given lists. Syntax is [left] INTERSECT [right] where the left and right arguments are each either names of lists in the List subfolder of the main FDC folder, with quotes around the name, or actual lists, usually produced by other list manipulating functions.

Is - Syntax is [data] is 'pattern' . This function is logical, and returns a 1 (True) when the pattern on the right occurs. Patterns currently available are 'top' and 'bottom'.   Note that the quotes around the name of the pattern are necessary. 

Killblanks - Syntax is KILLBLANKS [data] . This function kills off any rows in a dataset for which any of the entries are blank.

Killpercent - Syntax is (percent1 percent2) KILLPERCENT [data] . This function deletes all rows that contain elements in the bottom percent1 percent of the data or the top percent2 percent of the data in that element's respecive column.

Last - As in “last part of the Datset”.  Suppose you only want to look at the last part of a Dataset.  Instead of requesting [data] FROM 990101 TO 990601 you may simply want to request the last 100 days:  [data] LAST 100.  The function FIRST works similarly.

Lastbottom - Syntax is [data ] LASTBOTTOM n. If n is 1, this function returns, on each date, thevalue of the dataset on the most recent bottom. If n is 2, it returns the value of the dataset two bottoms ago (if this exists), and so on for any positive integer n.

Lastitem - The last computed or displayed dataset in the playlist. Only used during automatic execution of a command set.

Lastitemname - The name of the last computed ordisplayed dataset in the playlist. Only used during automatic execution of a command set.

Lastnum - The last computed numerical output (if any). It is the output shown at the bottom of the command window in the white field with blue text

Lasttop - Syntax is [data ] LASTTOP n. If n is 1, this function returns, on each date, thevalue of the dataset on the most recent top. If n is 2, it returns the value of the dataset two tops ago (if this exists), and so on for any positive integer n.

Length of the data – How long is your Dataset?  How many entries are in it?  Syntax is LEN [data], or LENGTH [data].  Note that numerical output such as this appears on the bottom margin of the command window.

Less than, less than or equal - LT and LE , or you may use their symbols “<” and “<=”.  These are “logical functions”, which like other logical functions produces a value of 1 when true and a value of 0 when false.  The best use is in combination with other functions to describe patterns.  They behave in similar fashion to “Greater than” and “Greater than or equal”.

List – Used only during automatic command execution, usually with "If" statements. The form is LIST [datasetname]. It adds datasetname to the current playlist.

Lists – Lists are used in fdc to provides names of datasets, functions, commands, etc. They can be sorted, and are used in the automatic programming mode.

Operating List Wizard Functions from the Command Palate:

SORT has several options. SORT [listname] will sort the list alphabetically. The quotes on the listname are necessary, if the list is a saved list in the list folder. Otherwise it may be an actual list generated by other list processing functions. This description holds for the arguments of all list processing functions. That’s the default. Should you wish to sort according to a criterion, enter it in quotes as a left argument. It should be an executable command. For example,

'LEN #R' SORT 'DEMOS'

The above will sort the list Demos according to the length of each item in the list.

To request the UNION of two lists, request list1 UNION list2
To request the INTERSECTION of two lists, request list1 INTERSECT list2
To request the DIFFERENCE of two lists, request list DIFF list2. Note that as in subtraction, the second-named list is subtracted from the first-named list. Thus you are advised of items in the first-named list that are not contained in the second-named list. Think of it as “list1 take-away list2”.
To request the SYMMETRIC DIFFERENCE of two lists, request list1 SYMDIFF list2
To SHUFFLE two lists, request list1 SHUFFLE list2. The shuffle operation takes the first item in list1, then the first item in list2, then the second item in list1, etc. Just like shuffling cards.
FLIP inverts your list. The syntax is FLIP listname .

If you enter a command line expression that produces a list, and do not save this list, the list will popup in a text document.

Certain other FDC functions now work on lists. For example, list1 FIRST 20 will produce the first 20 items in a list. The same works for LAST. Also, the GETS function will save a list. The syntax is [name] GETS list1 . Thus if you have performed various ranking operations and have selected the top 10 stock that have met your criteria, you can now save them in their own named-list.

Should you wish to manipulate lists in a command set, it is likely that you will occasionally wish to reset your playlists. This can be done by entering RESETPLAYLIST in a command line. The command Playlist works in a command set during automatic operation to access the current playlist.
See also Lists.

Logarithmic functions – Syntax is LOG [data] or LOG10 [data].

LOG [data] takes the natural log of each data entry, if positive.
LN [data] synonymous with LOG
LOG10
[data] takes the base-10 log of each data entry, if positive.

Logical functions – These are the functions that essentially pose a question or find a pattern.  Their output is a Dataset with ones and zeros, where 1=true and 0=false.  Their syntax is A LT B, where A and B are individual values or Datasets.  Following is a list of the logical functions and their mathematical symbol aliases.

EQ        equal                            =
NE       
not equal                      <>
LT       
less than                       <
LE       
less than or equal          <=
GT       
greater than                  >
GE       
greater than or equal     >=

Please review the Basic Tour of FDC commands in the User’s Guide for a detailed description of the operation of logical functions on Datasets.

Low – Syntax is LOW [data], or LO [data].  It performs similarly to CLOSE, OPEN and HIGH.  In market terminology the low is the lowest price of the day.  If your Dataset has 4 columns of data, FDC will automatically assume the low price will be the third column, as it is common usage to list the prices in the order of open, high, low and close.  Thus in a 4-column Dataset, LOW BONDS is synonymous with BONDS COLUMN 3.  Likewise, in a 3-column Dataset, it is conventional to assume the second column to be the low.  Therefore, in a 3-column Dataset, LO EURO is synonymous with EURO COL 2, or EURO COLS 2.  If you are looking for the cumulative low, refer to CUMMIN in the cumulative functions.  If you are looking for the “all-time low”, refer to TOTMIN in the “TOT” functions.

Macros – To create your own functions, just click on the Macro Wizard icon.  This is an extremely useful feature of FDC, and we encourage you to review the macro demo.

MakesProduces a logical output that has a 1 (TRUE) exactly on those days when data makes a 'top', a 'bottom', or either. Syntax is [dataset] MAKES [pattern]. The pattern must be 'top', 'bottom', or 'extreme' (quotes necessary).

MatchThis is our neat multiple linear regression function that enables you to “match the bogey”. Think of it as a linear version of a neural network. Syntax is [leftdata] MATCH [rightdata], where leftdata has columns for all of the variables you wish, and rightdata has a single column that is the target you are trying to match.

For example, suppose you want to hedge against a rise in commercial real estate prices. But of course, there is no tradable commercial real estate index or no commercial real estate futures contract. So you assemble all of the variables that you think might have an impact on commercial real estate prices (such as stock prices, interest rates, gold, etc.) and then have them match whatever past data you have on the real estate prices. There is no guarantee that the match you create will be good, or that even if good will persist in time.

The output will be coefficients of the variables in your left argument, which is identical to the quantities of those variables that need to be traded to give the best match to the bogey. Don’t be surprised if some of the coefficients are negative, meaning the positions should be shorts.

A subsequent command line such as hsum (numlast * leftdata) will produce your best estimate of the bogey. Note that any such relationship is unlikely to be stationary over time, so we have included the functions CUMMATCH and MOVMATCH. Syntax on the latter is: N leftdata MOVMATCH rightdata, where N is the number of data periods. For consistency with other commands, we have the function TOTMATCH as a synonym for MATCH.

Maximum (Minimum) – these functions are mathematical functions (like PLUS, MINUS, times & divide) and operate between two Datasets or numbers and choose the largest (smallest) of the two.  The syntax is A MAXIMUM B or A MINIMUM B .  Aliases are MAX and MIN.

Mean – see TOTAVE

Median – see TOTMED

Merging Datasets – the MERGE function.  This functions “glues together” Datasets together while taking into account their dates.  For example, [dataA] MERGE [dataB] forms a new series which starts with A (in its entirety) and then adds data from B corresponding to any dates not contained in A.  If there are any conflicts (e.g., both Datasets have a value for the same date), then the data in the first mentioned Dataset overrides that in the second.  Column names and plottypes are taken from the first Dataset also.
- the MERGEIN function.  This function is just like MERGE, except that the columns and plottype come from the second Dataset, while the data from the first still overrides.  The behavior with notes is also a little different.  Please see a full description of MERGE and MERGEIN in the Basic Tour of FDC commands in the User’s Guide. Finally there is the MERGEALL function. It merges seversl datasets, entered on the right side, for example

MERGEALL [dataset1] [dataset2] ... [datasetn]

Mergtoexcel– This function provides the only method that will combine a number of datasets, many with overlapping dates, into a distinct table. For example, you might run through a loop that makes a set of computations for each dataset in a list, and save just today's data. Then all datasets saved have just one row (today's date) and they should be combined into a table. This is what MERGETOEXCEL does. It adds a column of dates to the data and labels from the list items. Syntax is 'name' MERGETOEXCEL 'listname' (quotes needed), where 'name' is the name under which the the excel result should be saved.

Minus – If you wish to subtract one value or Dataset from another, just use the syntax

A MINUS B, or A – B.  If either A or B are Datasets, be mindful that the Datasets are matrices, and the normal mathematical rules for matrix operations apply:  One against many, many against one, and equals against equals.  If you are not familiar with such mathematical rules, please review the description of mathematical functions in the Basic Tour of FDC commands in the User’s Guide.

Mod – as in “remainder”.  If you divide 13 by 5, you get an integer of 2 with a remainder of 3.  In mathematical terms, the remainder is the Mod.  Syntax is N1 MOD N2, (or [data1] MOD [data2]), which will give the remainder after dividing N1 by N2 .  Note that the function is designed to work on integer data.  An excellent example of the use of this function can be found in Macro example #3 in Adding New FDC Functions: Macros in the User's Guide.

Monday - It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, etc.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ MONDAY) will yield a 1 (which in this logical statement means “true”) when Bonds closes on its high on a Monday.  Should you not remember that Monday is 1, then the FDC note will give you that information.

Month, Months – identifies for you the months by number.  Syntax is MONTH [data].  An example of its use is SNP WHEN ((MONTH SNP) EQ 3), which will identify only the SNP in the month(s) of March.  A synonym is MTH.

Monthly functions – as in “monthly data”.  Sometimes you want to operate on monthly data.  Your reasons could be that monthly average data is smoother than daily data, or that you have so much data (e.g., 20 years), that daily data would be just too cumbersome.  Or maybe you are comparing your daily data to the leading Economic Indicator Series, which is only published monthly.  Regardless of your reason, FDC will produce the monthly data series you request.  FDC will also give your data series a unique date, the 32nd of the month, so as not to be confused with the other data.  For example, if you request CL BONDS, (MTHAVE (CL BONDS)) you will get your daily data, plus an extra entry for the 32nd of the month (which will be the monthly average requested.)

MTHAVE computes a monthly average or mean.
MTHBARS makes bar chart data by computing the monthly open, maximum, minimum, and close, then arranging labels and charting.
If no open is available, it computes the synthetic bar chart data without opens
MTHCLOSE computes a monthly 'close' by choosing the last entry in each month.
MTHMAX computes the monthly maximum.
MTHMIN computes the monthly minimum.
MTHOPEN computes a monthly 'open' by choosing the first entry in each month.
MTHPROD computes the monthly product.
MTHSUM computes the monthly sum.

If you are looking for other uses for such functions, note that the monthly sum of a logical series (of ones and zeros) would be the number of occurrences of the event for the month.  The monthly average of a logical series would give you the percentage of times the statement was true for that month.

Moving functions – the most widely used tool of data smoothing is the moving average, which takes an average over a fixed number of days, or adapts to a different number of days on each date.  As time marches on, the moving average is always dropping data and adding new data to keep the n-period average.  The advantage of this type of data-smoother is that it is always updating itself with new data and dropping older (and presumably less-relevant) data.

MOVAVE computes a moving average or mean (MOVMEAN is synonymous.)
MOVCOR computes a moving correlation between two datasets.  The syntax is, for example, 25  A  MOVCOR  B, where 25 represents the number of periods being studied, and A and B represent the datasets being correlated.
MOVCOV computes a moving covariance between two datasets.  The syntax is, for example, 25  A  MOVCOV  B, where 25 represents the number of periods being studied, and A and B represent the datasets for which covariances are being calculated.
MOVMED computes a moving median, or middle value.  Moving medians ignore much data, particularly the “casual outliers”, but then adjust quickly when data movement becomes not insignificant.
MOVQUANT computes a moving quantile. A k% quantile is a number such that k% of the target numbers are below it and 100-k% are above. It is a generalization of median, in that the median is the 50 quantile. The syntax is N Q MOVQUANT [dataset], where N is the number of days and Q is the quantile.
MOVMATCH (see MATCH)
MOVMAX computes the moving maximum.
MOVMIN computes the moving minimum.
MOVOSC computesa movingoscillator. If you use the syntax, N MOV
OSC [dataset], where n is a positive integer, then the result is the same as CHANGE N MOVAVE [dataset]. If you use the syntax N K MOVOSC [dataset], where N and K are
positive integers with N <
K, the result is the same as ( N MOVAVE [dataset]) - ( K MOVAVE [dataset]). Finally, you can use this function in the form [params] MOVOSC [dataset], where the parameters sum to 0, and their absolute values sum to 1.
MOVPROD computes the moving product.

MOVSLOPE
in the expression ( N MOVSLOPE [dataset]) takes data for the last N periods, fits a least-squares regression through them, and then calculates the slope of that regression line. It works on each column of data independently.

MOVSLOPEALL is like MOVSLOPE, but all data in all columns are included in finding the one regression line whose slope is returned.
MOVSTDV computes a moving standard deviation around the (moving) mean.
MOVSTDV1 computes a moving standard deviation around the (moving) mean, but uses the sum of absolute values to compute error, rather than the square root of sums of squares.
MOVSUM computes the moving sum.

MOVTREND computes a moving trendline by fitting a least-squares regression through each of the N data periods, and calculating the current data point on that regression line, or the point that would lie on the regression line k days in the future.  This is a much more dynamic smoother than a moving average. It also has a slightly different syntax.

N K MOVTREND [dataset]

computes the regression line for the given data over the last N days, and returns the point on that line lying K days in the future. If K is omitted, then it is assumed to be 0. MOVTRENDALL is like MOVTREND, but applies to the average of all columns and produces a 1-column output. 

MOVTRENDALL computes a moving trendline by fitting a least-squares regression through each of the N data periods, and calculating the current data point on that regression line, or the point that would lie on the regression line k days in the future.  This is a much more dynamic smoother than a moving average. It also has a slightly different syntax.

N K MOVTREND [dataset]

computes the regression line for the given data over the last N days, and returns the point on that line lying K days in the future. If K is omitted, then it is assumed to be 0. MOVTRENDALL is like MOVTREND, but applies to the average of all columns and produces a 1-column output. 

MOVVAR computes a moving variance of each column of a dataset.

MOVAND computes the moving logical “and” of two conditions.  For example, if one enters the command (CLOSE data1) = (HIGH data1), the result is a logical or “True False” Dataset.  A value of 1 on a given date means that data1 did close on its high on that date, and a 0 means that it did not.  Then, if the result was the Dataset TEMP1, the subsequent request 4 MOVAND TEMP1 would combine the results of TEMP1 logically with AND, 4 days at a time.  Thus the first result of 4 MOVAND TEMP1 would be a 1 if data1 closed on its high on the first day, and the second day, and the third day, and the fourth day; that is 4 days in a row.  A 0 would mean that this pattern did not happen on all of those 4 days.  This result is computed for each consecutive 4-day period.

MOVOR is similar to MOVAND , but combines results with a logical OR.  Thus if TEMP1 is as above, the expression 4 MOVOR TEMP1 would return a 1 on each consecutive 4 day period in which data1 closed on its high on the first day, or the second, or the third, or the fourth; that is, on any one of the four days.

In most of the MOV functions, the syntax for one moving calculation is N MOVfunction [data].  A typical example would be 3 MOVAVE (CL SNP).

Because of the importance given moving functions by the technical investing community, FDC has made it easier to do multiple calculations of one moving function.  For example, to get the 3, 5 and 10 period moving averages simultaneously, request: 3 5 10 MOVAVE [data].  Note there are spaces between the N1 N2 N3 numbers, not commas.  Also be mindful of the rules of matrix manipulation (One against many; many against one; equals against equals.)  If you are not familiar with such mathematical rules, please review the description of the moving functions in the Basic Tour of FDC commands in the User’s Guide.

Note that the left argument of any of the moving functions can be a dataset, which will have the result of making the moving function adaptive, that is, the inputs can vary by date. If any entry in N is not a positive integer, it will be replaced by the nearest positive integer. These rules avoid errors when using the output of another computation as N.

Negative – the function NEG gives you the negative values, and essentially discards the positive values.  It does this by giving you back the negative values and changing the positive values to zero.  The syntax is simply, NEG [data].  The POS function does the opposite.

Next functions – FDC has many functions that act as smoothers or oscillators. The most familiar are the moving average, difference of two moving averages, and weighted average. There is also the weighted sum, and the much less familiar moving trend function. For a moving average, applied say to a price dataset, it is often useful to know the price tomorrow that will result in no change in the average; that is, the price tomorrow above which the average will have moved up (from today) and below which it will have moved down. This price is returned today by the function NEXTTURNMOVAVE, with syntax

n NEXTTURNMOVAVE [dataset]

When applying the average to a dataset with both positive and negative values, such as an oscillator, we might want to know the value of the oscillator tomorrow at which the average will be zero. This is returned by the function NEXTZEROAVE, with syntax

n NEXTZEROMOVAVE [dataset]

Similar functions exist for the difference of two moving averages, for weighted averages, and for weighted sums. A nextturn function also exists for movtrend and movtrendeach. These various functions are as follows (in order discussed).

NEXTTURNMOVAVE Syntax is n NEXTTURNMOVAVE [dataset]; gives the price at which n MOVAVE [dataset] would be unchanged tomorrow.

NEXTZEROMOVAVE Syntax is n NEXTZEROMOVAVE [dataset]; gives the price at which n MOVAVE [dataset] would be 0 tomorrow.

NEXTTURNDIFFMOVAVE Syntax is n k NEXTTURNDIFFMOVAVE [dataset]; gives the price at which (n MOVAVE [dataset]) - ( k MOVAVE [dataset]) would be unchanged tomorrow.

NEXTZERODIFFMOVAVE Syntax is n k NEXTTURNDIFFMOVAVE [dataset]; gives the price at which (n MOVAVE [dataset]) = ( k MOVAVE [dataset]) tomorrow.

NEXTTURNWTAVE Syntax is params EXTTURNWTAVE [dataset] gives the price at which params WTAVE [dataset] would be unchanged tomorrow.

NEXTZEROWTAVE Syntax is params EXTTURNWTAVE [dataset] gives the price at which params WTAVE [dataset] would be 0 tomorrow.

NEXTTURNWTSUM Syntax is params EXTTURNWTSUM [dataset] gives the price at which params WTSUM, [dataset] would be unchanged tomorrow.

NEXTZEROWTSUM Syntax is params EXTTURNWTSUM [dataset] gives the price at which params WTSUM, [dataset] would be 0 tomorrow.

NEXTTURNMOVTREND Syntax is n NEXTTURNMOVTREND [dataset]; gives the price at which n MOVTREND [dataset] would be unchanged tomorrow.

NEXTTURNMOVTRENDALL Syntax is n NEXTTURNMOVTRENALL [dataset]; gives the price at which n MOVTRENDALL [dataset] would be unchanged tomorrow.

Not – the function NOT changes the truth statement of a logical series.  Remember that a logical series is one where the entries are identified as either true (value=1) or false (value=0).  Thus, NOT would change zeros to ones, and vice versa.  For example, A AND (NOT B) would give you a true statement (value=1) when A was true and B was false.  If you do a lot of work involving pattern recognition and replication, you will come to value this function for its ability to shorten your work.

Not equals – the opposite of equals.  The syntax is A NE B.  A synonym is “ <> “.  This is a logical function, which like other logical functions produces a value of 1 when true and a value of 0 when false.  Its best use is in combination with other functions to describe patterns.  For example, SNP WHEN ((HI SNP) NE (CL SNP)) will provide the entries when SNP did not close on its high.

Notes – or “FDC Notes” can be attached to any Dataset or command set.  Use them as you would a footnote or a Post-it Note®, to remind you of your procedures, exceptions, etc.  Just click on the Note icon to use them.  If there is a note applicable to a Dataset or command set, a check mark appears on the Note icon.

On – Syntax is [data] ON [date].  The result is that data (if any) from the Dataset data on the specified date.

Open – Syntax is OPEN [data], or OP [data].  It performs similarly to CLOSE, LOW and HIGH.  In market terminology the open is the first price of the day.  If your Dataset has 4 columns of data, FDC will automatically assume the open price will be the first column, as it is common usage to list the prices in the order of open, high, low and close.  Thus in a 4-column Dataset, OPEN BONDS is synonymous with BONDS COLUMN 1.  However, in a 3-column Dataset, it is conventional to assume the columns stand for high, low and close.  That is, there is no open. 

Openasciidata – Syntax is OPENASCIIDATA [datasetname].  If datasetname is a fully qualified path to a textfile, then FDC will convert this file and display the result (if possible). If only a name is given (no path) the the function will assume that the data is in the ascii subfolder of the FDC folder.

Open Interest – Syntax is OPENINT [data], or OI [data].  In futures market terminology the open interest is the number of outstanding futures contracts.  OI represents the number of positions which must be liquidated prior to the contract’s expiration.  It is comparable to “short interest” in the stock market, except that OI is both short interest and long interest.  Many professionals use the OI figure to weight market action.  If your Dataset has 6 columns of data, FDC will automatically assume the open interest will be the sixth column, as it is common usage to list the prices in the order of open, high, low, close, volume and open interest.  Thus in a 6-column Dataset, OI GOLD is synonymous with GOLD COLUMN 6.  Requesting VOI [data], will get you the volume and open interest.

Or – one of the logical functions of FDC, similar to AND and NOT, which examines two logical series and expresses a value of 1 (meaning that either logical series is true) or 0 if both were false.  For example:

((HI BONDS) = (CL BONDS)) OR ((UPRUN CL BONDS) GE 3)

will yield a 1 when BONDS closes on its high on any day or if the close of bonds has been higher for 3 or more consecutive days.  Also,

BONDS WHEN (((HI BONDS) = (CL BONDS)) OR ((UPRUN CL BONDS) GE 3))

will display the entries of the Dataset BONDS precisely on the days when those conditions occurred.

PackagePACKAGE [dataset], alters the dataset by inserting a first column of dates. This makes the dataset complete for purposes of copying and ten pasting in a spreadsheet or word processor.

Parabolic – as in “parabolic predictions.”  You may access the parabolic prediction template by either clicking on the icon, or by typing PARABOLIC in a command line.  We have prepared a parabolic prediction demo dedicated to this important function.  FDC gives you the capability to access the parabolic prediction via a command line should you wish to save a favorite command line.  When you enter PARABOLIC either by command line, or icon, FDC suspends other actions and waits for you to complete your parabolic work.  In this regard, PARABOLIC is a deferred function similar to BLANK. 

Pfbearresist – Syntax is [params] PFBEARRESIST (dataset date). This function produces piecewise linear data with the same dates as . It is designed to work with the time extended point and figure chart given by PFTIME, and represents the time extended version of the usual 45 degree bearish resistance line drawn on the corresponding point and figure chart. The date on the right side gives the starting point of the resistance data.

params consists of (column1 column2 type x rev), where columns 1 and 2 are column numbers of High and Low for that type of bar chart, or Close and 0. Type is 1 for fixed box size (x gives the box size in dataset units), 2 for logarithmic box determination (x gives the percentage increase), 3 for the traditional box determination, and 4 for Bollinger Boxes. Rev gives the box reversal number. This explanation holds for the following PF functions as well.

Pfbullsupport – Syntax is [params] PFBULLSUPPORT (dataset date). This function produces piecewise linear data with the same dates as . It is designed to work with the time extended point and figure chart given by PFTIME, and represents the time extended version of the usual 45 degree bullish support line drawn on the corresponding point and figure chart. The date on the right side gives the starting point of the resistance data.

Pfline – Syntax is [params] PFLINE [dataset]. This function produces sequential data that mimicks the usual point and figure chart, except that a new box is plotted one unit to the right wheneveryou move to it.

Pfline1 – Syntax is [params] PFLINE1 [dataset]. This function produces sequential data that mimicks the usual point and figure chart, except that a new box is plotted one unit to the right wheneveryou move to it, and any intermediate boxes that were skipped are also ploted in the same way. The resulting piecewise linear curve has all of its lines at 45 degrees or negative 45 degrees.

Pftime – Syntax is [params] PFTIME [dataset]. This function produces data with the same dates as the dataset, but which, in its vertical movement, is equivalent to the usual point and figure chart.

Playlist – The list that contains all datasets produced by the last automatic playing of a set of commands. It may also be modified by "list" and "unlist".

Plus – If you wish to add one value or Dataset to another, just use the syntax A PLUS B, or A + B.  If either A or B are Datasets, be mindful that the Datasets are matrices, and the normal mathematical rules for matrix operations apply:  One against many, many against one, and equals against equals.  If you are not familiar with such mathematical rules, please review the description of mathematical functions in the Basic Tour of FDC commands in the User’s Guide.

Plusminus – This is a convenience function that allows you to conveniently display a range of data around another dataset.  For example, if you wished to display the price of the Euro with a value 20 points higher and a value 20 points lower, enter EURO PLUSMINUS 20 .   You may also enter EURO +-  20, or another function such as EURO PLUSMINUS (5 MOVSTDV CL EURO). When this function is applied on a dataset with n columns, your output will be a dataset with 2n columns. In the output dataset, the first n columns will be the ‘plus’ columns, with the last n columns being the ‘minus’ columns. 

Polytrendits a polynomial of specified degree to data, minimizing the sum of squares of the errors.  The syntax is n POLYTREND [data] ], where N is the degree.  If degree is 1, this is a trend line, or linear least squares fit.  If degree is 2 then the result is a best fitting parabola.  Similarly for any degree.  Note that POLYTREND operates on each column separatrely.

PolytrendallFunctions similarly to POLYTREND, except that it uses all available data on a given date to calculate fit, and produces a single output column.  .

Pos –the function POS gives you the positive values, and essentially discards the negative values.  It does this by giving you back the positive values and changing the negative values to zero.  The syntax is simply, POS [data].  The NEG function does the opposite.

Power – Should you wish to take a quantity or a Dataset to a power other than 1, the syntax is [data] POWER N, where N is the power.  Powers can be negative (i.e.,  the inverse of the expression, or fractional (i.e.,  a root), but if so, put the expression in parentheses to avoid confusion.  For squaring data, note that the expression SQR [data], will produce results identical to [data] POWER 2.

Print – Printsd the data associated with any dataset. Syntax is PRINT [data].\

Quantile– See TOTQUANT.

Randintens – Syntax is k RANDINTENS [dataset], with k an integer between 1 and 9. The function divides the rows of data into 10 equal parts (with one possibly a fraction smaller), and chooses exactly k rows from each division. The primary use of this function is to choose data for use in a neural net, where the actual dates are not important.

Random – Syntax is n RANDOM [dataset], with n an integer between 1 and 9. The function chooses k rows of data at random.

Randpercent – Syntax is k RANDPERCENT [dataset], with k a percent. The function chooses k percent of the rows of data at random.

Range – The price midpoint, that is (high + low)/2. Syntax is RANGE [dataset].

Remainder – as in the “Mod”.  If you divide 13 by 5, you get an integer of 2 with a remainder of 3.  In mathematical terms, the remainder is the Mod.  Syntax is N1 MOD N2, (or [dataA] MOD [dataB]), which will give the remainder after dividing N1 by N2.  Note that the function is designed to work on integer data.

Remove – as in “remove data”.  This is a utility function for Dataset maintenance.  It functions operationally similar to the merge function.  The syntax is [data] REMOVE date1 date2 date3 … .  As a convenience, REMOVE will also function by using a second Dataset in the form A REMOVE B.  The result is that all rows are removed from A that begin with dates that occur in B.  Thus, SEPTOIL REMOVE OCTOIL will remove from SEPTOIL any rows that correspond to dates that it shares with OCTOIL.  Such operations are sometimes useful when splicing data series together.

Reset – as in “reset the temporary Dataset number”.  As you get buried in your research you will undoubtedly be creating temporary Datasets.  FDC creates these Datasets to facilitate your continuous operations, without requiring you to save or name the output of each and every request.  They are all given names in the format tempN.  Should you wish to reset the counter back to 1, then just type RESET in a command line.  The next temporary Dataset produced will be called TEMP1, and numbering will then increase from 1.  RESET can also be saved in a command set.

Resetplaylist – Used within a command set so that, during automatic execution, the playlist can be cleared.

Roots – roots are merely reciprocal powers.  That is, the square root of a quantity or Dataset is its one-half root.  That is, SQRT [data], will produce identical results as the expression [data] POWER (1/2).  Should you wish to take the 360th root of an annual yield (i.e.  to obtain the daily yield that compounds up to your annual yield), try YIELD POWER (1/360).

Round – should you have non-integer data, and need integers, just request ROUND [data], each entry will be rounded to the nearest whole number.

Saturday – It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, etc.  Saturday’s is 6.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ MONDAY) will yield a 1 (which in this logical statement means “true”) when Bonds closes on its high on a Monday.

Saveasasciiwe have created this facility to enable you to export data in ascii format. Syntax is 'name you wish to save as' SAVEASASCII [data].

That is: 'stocks' SAVEASASCII snp

The quotation marks are necessary (use the lowercase quote key). This function has several defaults. Specifically, the dataset will be saved in the ascii subdirectory of the FDC directory with dates, column labels and a comma delimiter. If you do not have an ascii subdirectory, FDC will automatically make one for you.

You may save the file anywhere you wish by specifying a complete path name. For example:

'C:\investments\stocks' SAVEASASCII snp

Should you wish to save files without dates or columns or with different delimiters, just contact us and we will tell you how to do it. Some neural nets require ascii files with different delimiters as inputs.

Alternatively you may select “save as ascii” from the menu line on any dataset. However in using the menu line, the new dataset will be saved in the ascii subdirectory with dates and labels.

Sequence – Suppose you want to remove the dates from a Dataset, and renumber them “1, 2, 3, etc.”  That is, you want to replace the dates with ordinal numbers.  The syntax is SEQUENCE [data].  The request SEQUENCE BONDS FIRST 100 will give you the first 100 entries of Bond data.  The entries will be “dated” as “1, 2, 3, etc.  to 100”.

Setlabels– Syntax is 'string' setlabels [dataset]. Here the string contains the labels, seperated by commas, that are to be assigned to the columns of the dataset. The 'blanks' (i.e. adjacent commas with no text in between) leave that corresponding column of the dataset with its default label of 'Column'

Setplot– The syntax is [name] setplot [data], where the first argument is the name of a plottype (a complete plot description you have named and saved) and the second argument is any fdc dataset. Quotes around name are necessary. This function attaches the plottype to the dataset so that it will plot in the desired form. If you save the result, the attached plotting form becomes the permanent plottype for that dataset.

Show – Syntax is SHOW [computation resulting in a dataset]. Example:

SHOW 3 MOVAVE ((HIGH IBM) + (LOW IBM))/2

The resulting computation is performed and the resulting dataset is displayed in the usual way. This is illustrated by the fact that the stored name, appearing as a label on the command line, is in brown, not gray. If you place the cursor on the corresponding command line after execution, the F11 key will toggle back and forth between displayed mode and hidden mode. If the default display option (set with the 'options' menu) is 'SHOW', meaning display all computed datasets as usual in their own windows, it is not necessary to use the command SHOW on a command line. If the display option is 'HIDE', then all computed datasets are hidden, and the command SHOW will override the default. See help under 'Hide' for more information on hiding datasets.

Showgets– Like the function "Gets" in that it automatically saves a dataset under another assigned name. Unlike "Gets", however, the output dataset is also displayed.

Shuffle– Make a new list by intertwining two given lists, alternating from one to the other. See Lists.

Sign suppose you only want to know the sign of the data.  That is, all that matters to you is whether the entries are positive, negative or zero.  The expression SIGN [data]  will return for you a value of 1 if the entry is positive, a value of –1 if the entry is negative, and a 0 if the entry is zero. 

Sin – “sine”, a trigonometric function.  The syntax is SIN [data].  Should you wish the hyperbolic sine, the syntax is SINH [data].

Sort – Sorts a list, either alphabetically or by outcome of a command. Used under program control. See Lists.

Squares and square roots – to square your data, just enter SQR [dataA].  To take the square root of data, enter SQRT [data].

Standard deviation – The syntax is  STDV  [data] .  Standard deviation can be calculated over various time periods.  For example, you may wish to calculate it over the entire length of the dataset, in which case use either STDV or its alias TOTSTDV.   The output will be the standard deviation for each column in your dataset.  That information, together with the TOTMEAN can give you some useful statistical information. You can also calculate it on a cumulative basis by requesting CUMSTDV.  And you can calculate standard deviations on moving sections of data with MOVSTDV.  In the latter case the syntax is N  MOVSTDV  [data] , where N represents the number of periods being studied.

Standard Rules for Matrix Operations – The standard rules are: “One against many; many against one, equals against equals.” Examples illustrate this best: MOVAVE MSFT will perform a 5-period moving average against whatever entries are in the MSFT dataset. If MSFTis a one-column dataset (e.g., the close only), the request will leave you with a one-column dataset displaying a 5-period moving average of the close. If MSFT is a four-column dataset (e.g., open, high, low, close), that same request will produce a four-column output in which you will get 5-period moving averages of the open, high, low and close.
Should you request
5 10 20 MOVAVE TBILLS where the dataset TBILLS is one-column, then your output will be a three-column dataset of the 5-period moving average, the 10-period moving average and the 20-period moving average of TBILLS .

Should you request
5 10 20 MOVAVE SNP where the dataset SNP has three columns (e.g., high, low, close), the request will create for you a 5-period moving average of the high for SNP, a 10-period moving average of the low for SNP, and a 20-period moving average of the close of SNP.
It is not possible for you to request
5 10 20 MOVAVE WMT where the dataset WMT has five columns (e.g., open, high, low, close, volume). That is, in matrix operations it is not possible to do 3 things to 5 columns. You will get an error message.

StartatThis function allows automatic execution to be started at a precise future time. See Time delays.

Stepwise weighted averages – see “Weighted averages”.

Stop This stops the autoplay running of a command set. Syntax is :STOP, that is, a colon followed by the word “stop” .

StripIt is possible for operations to produce datasets as output in which some of the entries have no data. For example, a 10-day moving average will have no data for the first 9 days. Should you wish to remove dated entries on which no data exists, request STRIP [data] .

Summary - Used to access any particular summary statistic of a dataset that results from a trade simulation. Syntax is [dataset] summary 'item' . For example, to get net profit or loss for all trades, enter [dataset] summary 'netpla' . Change the final letter to 's' or'b' to restrict to short or long trades only. The item 'netpl' can be replaced by any summary statistic you see on the trade statistics page (without the '#').

Sunday - It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, etc.  Sunday’s is 7. 

Symdiff - Applies to two lists, and outpouts there symmetric difference. See Lists.

Tangent - a trigonometric function.  The syntax is TAN [data].  Should you wish the hyperbolic tangent, the syntax is TANH [data].

Thursday - It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, etc.  Thursday’s is 4.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ THURSDAY) will yield a 1 (which in this logical statement means “true”) when Bonds closes on its high on a Thursday. 

Times - Equivalents are TIMES, or *.  The syntax is A TIMES B.  A and B can be Datasets or numerical values.  If either A or B are Datasets, be mindful that the Datasets are matrices, and the normal mathematical rules for matrix operations apply:  One against many, many against one, and equals against equals.  If you are not familiar with such mathematical rules, please review the description of mathematical functions in the Basic Tour of FDC commands in the User’s Guide.

Time - Shows the current Year, month, day, hour, and minute in the numerical result bar.

Time Delays - Suppose you want to run a command set on autoplay at a later time, or insert a delay in an autoplay for some other purpose. The command DELAY 2 will introduce a 2-second delay. If no left argument is specified, the default is seconds. For example, DELAY 21400 will produce a 6-hour delay. However you may also specify hours, minutes or seconds by entering ’HOURS’ DELAY 6 for the 6-hour delay. The quotes are necessary for the left argument. This command can also work in a macro.
Instead of specifying a delay, you may advise what time to start. For example, specifying STARTAT 11 30 will advise FDC to start at 11:30 A.M. (and no seconds) on the local computer clock. Use 24 hr clock, so the 3:30 P.M. would be 14 30. If you specify a complete dated time, e.g. 2005 03 24 9 23 , you can schedule as far ahead as you want.

To – The second half of the expression “from, to”.  As in “to the following date”.  The syntax is [data] TO 990601, or BONDS FROM 990101 TO 990601.  If you do not limit the starting date by using FROM, then FDC will assume that your request is for the Dataset to start at its beginning.

Today – Can be used in a command line in place of a date, and always returns the current date.

Total functions these functions (the “TOT” series) perform operations on the entire column of data (i.e.  vertically).  The output is undated, and has a single entry for each column.  The syntax is TOTfunction [data] (except TOTCOR).

TOTMEAN and TOTAVE are equivalents and will produce the column average for each column of data.

TOTMAX works similarly.  For example, if BONDS is a 4-column Dataset, then the expression TOTMAX BONDS will give you output of 4 entries, the first showing the highest open, the second showing the highest high, the third showing the highest low, and the fourth showing the highest close.  There will be no dates displayed, as each entry could have easily occurred on different dates.  The expression TOTMAX HI BONDS will give you the highest high.

TOTMIN works similarly to TOTMAX.
TOTSUM
adds up all the entries in each column and gives you a total.
TOTPROD produces a product of all of the entries in each column.
TOTMATCH (see MATCH)

TOTMED computes the middle value or median.
TOTQUANT computes an overall quantile. A k% quantile is a number such that k% of the target numbers are below it and 100-k% are above. It is a generalization of median, in that the median is the 50 quantile. The syntax is Q TOTQUANT [dataset], where Q is the quantile. This is identical with Q QUANTILE [dataset].
TOTSTDV produces the standard deviation for each column.  That together with the TOTMEAN can give you some useful statistical information.
TOTCOR enables you to calculate the overall correlation of corresponding columns of datasets.  To compute the column by column correlation of two datasets A and B, just enter A TOTCOR B.

Please see a description of the “TOT” functions in the Basic Tour of FDC commands in the User’s Guide.

Trend the TREND function fits a trend line to a complete data series and then provides the values of that trend line. The method used by the function is “least-squares regression”.  Note that it works across the full history of dataset you have selected, so be careful what you select.  The syntax is TREND [data].  Should you wish to fit trends on smaller periods of data, you may want to try the MOVTREND function.

Trendall - Functions similarly to TREND, except that all of the columns of input data are averaged, with the resulting output having one column.

Trigonometric functions - Syntax is SIN [data].  These functions are:

SIN - sine
COS
- cosine
TAN - tangent
ARCSIN - arcsine
ARCCOS - arccosine
ARCTAN - arctangent

Trimpercent - Syntax is (percent1 percent2) TRIMPERCENT [data] . This function works separately on each column of data. It replaces each entry that is in the bottom percent1 percent of the data with the smallest number in the top (100-percent1) percent. It performs similarly on the top percent2 entries.

Let’s give you an example: Suppose you have a dataset (such as an indicator) that has a fairly limited range most of the time, except that occasionally it has some extreme outliers. Those extreme values may be errors or they may just be the result of some unusual circumstances. The problem is that if you include the extreme values in your decision making process, you get distorted results. So the obvious solution is to trim back the excessive high and low values to not-so-excessive high and low values.

If, in calculating RSI (Relative Strength Index) for a particular market (say Bonds), you find that the lowest 5 percent of values and the highest 10 percent of values create distortions, then the request

(5 10) TRIMPERCENT rsi bonds

will look at the full range of values and divide it up into percents. Any values below the lowest 5 percent will be valued at that 5 percent level, as also any values above the highest 10 percent will be valued at that 10 percent level.

Truncating dataTRUNC [data] takes the integer part of data, dropping the fractional part.

Tuesday - It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, etc.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ TUESDAY) will yield a 1 (which in this logical statement means “true”) when Bonds closes on its high on a Tuesday. 

Union – Applies to lists to produce the union. See Lists.

Unlist – Used only during automatic command execution, usually with "If" statements. The form is UNLIST [datasetname]. It removes datasetname from the current playlist.

Upday, Uprun - UPDAY [data] will give you values of 1 when the change is positive from the previous entry, and values of 0 when it is not.  For example, the expression BONDS WHEN ((UPDAY CL BONDS) GT 0) will display all entries for bonds when bonds have closed higher from the preceding entry.  UPRUN [data] will give you a 0 when the value is lower or equal to the previous data, but positive values for each consecutive up value.  The first up data entry will earn a value of 1, with the next value (if up) earning a 2, etc.  The opposites are DOWNDAY and DOWNRUN.

Var Total variance. Synonym for TOTVAR.

Vertbar – Syntax is  n vertbar m, where n and m are integers and n < m. The result is the sequence n, n+1, ..., m. Thus 1 vertbar 10 is a synonym for 1 2 3 4 5 6 7 8 9 10. This is useful for selecting columns and in programming loops. It is abreviated by the symbol "|" (on most keyboards this is the cap above the symbol "\").

Volume – Syntax is  VOLUME [data], or  VOL [data].   FDC automatically assumes that the fifth column of a dataset is the volume column.  Typically stock market data is presented as Open, High, Low, Close and Volume.  Futures data is the same, except that a sixth column (for open interest) is added.  Thus, VOLUME GOLD is identical to the request  GOLD COLUMN 5.  Should you wish to name your columns (and therefore have them in whatever order you choose), you can then request GOLD COL “VOLUME”. Remember the quotes, as they tell FDC to go and look for that column heading. Should you have futures data and request VOI GOLD, then you will retrieve the 5th and 6th columns (for volume and open interest).

Wednesday - It is possible in your research that days of the week are important, as in pattern recognition.  For convenience, FDC gives you the ability to describe the days by name as well as by number.  Monday’s number is 1, Tuesday’s is 2, Wednesday’s is 3, etc.  The command ((HI BONDS) = (CL BONDS)) AND ((DW BONDS) EQ WEDNESDAY) will yield a 1 (which in this logical statement means “true”) when Bonds closes on its high on a Wednesday. 

Weekly functions - as in “weekly data”.  Sometimes you want to operate on weekly data.  Your reasons could be that weekly average data is smoother than daily data, or that you have so much data (e.g.,5 years), that daily data would be just too cumbersome.  Or maybe you are comparing your daily stock market data to the money supply, some of which is only published weekly.  Regardless of your reason, FDC will take your daily data and produce the weekly data series you request.  The Syntax is WKfunction [data].

WKAVE computes a weekly average or mean.
WKBARS makes bar chart data by computing the weekly open, maximum, minimum, and close, then arranging labels and charting.
If no open is available, it computes the synthetic bar chart data without opens.
WKCLOSE computes a weekly 'close' by choosing the last entry in each week.
WKMAX computes the weekly maximum.
WKMIN computes the weekly minimum.
WKOPEN computes a weekly 'open' by choosing the first entry in each week.
WKPROD computes the weekly product.
WKSUM computes the weekly sum.

Weekdate interpolation - If you are missing a weekdate (i.e., you have a hole in your Dataset), you may wish to fill it with the WKDATEINTERP function, which will interpolate missing dates and their interpolated values.  The syntax is WKDATEINTERP [data].  The function DATEINTERP operates similarly, but supplies all of the missing dates (weekends in addition to weekdates).  Our suggestion is to limit the interpolation functions by date as in:  WKDATEINTERP BONDS FROM 990101 TO 990601.

WkdayssinceWKDAYSSINCE date will return the number of week days between the specified date and today's date, inclusive. It returns a sincle constant.

Weighted averages – One of the data smoothers provided by FDC is the stepwise weighted average. Let us assume that you are looking at smoothing over a 5-day period, but that you want to weight the most recent data more heavily than the preceding data. In fact, you can weight the days however you like. The syntax is N1 N2 N3 N4 N5 WTAVE [data], and you decide the N values, which can be any numbers.

Each day will be multiplied by the weighting factor (the N value) and the sum of those results will be divided by the sum of the absolute values of the weights. If the weights are all positive, this last division simply replaces them by proportional weights that add to 1. This will result in the output data having the same approximate size as the input data. Such a computation is often referred to as a weighted moving average.

Of course some of the weights may be negative, which results in a somewhat different computation. For example, -1 0 0 0 1 WTAVE [data] produces the change in the 4 day moving average of the data, something usually called an oscillator. All oscillators can be produced in this way.
There are other weighted averages that are mixtures of moving averages and oscillators. One of the favorite gurus uses the following with considerable success: -2.5 -1.5 -0.5 3 5.5 4.5 1 WTAVE MIDRANGE [data].

Weighted averages do not obey the standard rules for matrix operations. All of the data on the left is necessary for each computation, and it applies to each data column separately.

As with all of the moving functions, weighted averages can easily be made adaptive. To do so, just request N WTAVE [data], where N is a dataset itself. On each date, N contains a row of numbers to be used as weights on that date.

Weighted sumThis function behaves similarly to WTAVE, except that WTSUM takes the sum without averaging. The syntax is: a1 a2 a3 WTSUM [data]. Naturally, making the left argument a dataset can make this function adaptive. As with WTAVE, WTSUM does not follow the standard rules for matrix operations, but applies the weights to each data item of each column. The weighted sum function is necessary for the calculation of several technical indicators including the Center of Gravity indicator.

When – One of the most useful functions in pattern recognition is the WHEN function.  It specifically operates by performing an operation or providing a Dataset “when the following conditions are true”.  The Syntax is [data] WHEN [logical series], as in:  DOW WHEN ((UPDAY CL DOW) GT 0).

Width – The Syntax is WIDTH [data].  The result is the number of columns in the dataset. Used primarily in automatic execution.

With – To place data together use either WITH or its alias, the comma (“ , “).  The Syntax is [dataA] WITH [dataB].  The columns of [dataA] will be listed on the left of the new Dataset, followed by the columns of [dataB].  Please see a description of the WITH function in the Basic Tour of FDC commands in the User’s Guide.

Year, years, yr - The Syntax is YR [data].  The result is a Dataset that, for each date, lists the year that contains that date.

Yearly functions - as in “yearly data”.  Sometimes you want to operate on yearly data.  Your reasons could be that yearly average data is smoother than monthly data, or that you have so much data (e.g.,100 years), that monthly data would be just too cumbersome.  Or maybe you are comparing your data to something which is only published yearly.  Regardless of your reason, FDC will take your Dataset and produce the yearly data series you request.  The Syntax is YRfunction [data].

YRAVE computes a yearly average or mean.
YRBARS makes bar chart data by computing the yearly open, maximum, minimum, and close, then arranging labels and charting.
If no open is available, it computes the synthetic bar chart data without opens
MTHCLOSE computes a yearly 'close' by choosing the last entry in each year.
YRMAX computes the yearly maximum.
YRMIN computes the yearly minimum.
YROPEN computes a yearly 'open' by choosing the first entry in each year.
YRPROD computes the yearly product.
YRSUM computes the yearly sum.