# doc-cache created by Octave 4.2.1
# name: cache
# type: cell
# rows: 3
# columns: 81
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
binprice


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2257
 -- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
          RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE)
 -- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
          RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE, DIVIDENDRATE)
 -- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
          RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE, DIVIDENDRATE,
          DIVIDEND, EXDIV)
     Compute American call and put option prices using a binomial tree.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: INCREMENT Time increment.  INCREMENT is rounded to
          ensure that TIME/INCREMENT is an integer.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: OPTTYPE Option type.  1 = call option, 0 = put
          option.
        * Variable: DIVIDENDRATE (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.
        * Variable: DIVIDEND (Optional, default = 0) The dividend
          payment at an ex-dividend date as specified by EXDIV.
        * Variable: EXDIV (Optional, default = 0) A vector used to
          determine the ex-dividend dates.  For each j, EXDIV(j) *
          INCREMENT is the corresponding dividend date.

     Computes the American call and put option prices using the
     Cox-Ross-Rubinstein binomial tree.

     Discrete dividends (i.e.  DIVIDEND and EXDIV) have not yet been
     implemented.

     Binomial trees are a particular explicit finite difference method
     for solving the Black-Scholes equation (see 'M. Rubinstein. On the
     relation between binomial and trinomial option pricing models.
     Journal of Derivatives, 8(2):47-50, 2000'), and exhibit linear
     convergence along with the usual strict stability requirements of
     an explicit method.  The serious practitioner should consider using
     a more sophisticated method, and use binomial trees only for
     explanatory or heuristic purposes.

     See also: blkprice, blsprice.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Compute American call and put option prices using a binomial tree.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blkimpv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1477
 -- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
          VALUE)
 -- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT)
 -- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT, TOLERANCE)
 -- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT, TOLERANCE, CLASS)
     Compute implied volatility under the Black-Scholes model.

        * Variable: PRICE The current price of the underlying asset (a
          futures contract).
        * Variable: STRIKE Exercise price of the futures option.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VALUE Price of the European option from which the
          underlying's volatility is derived.
        * Variable: LIMIT (Optional, default = 10) Upper bound of the
          implied volatility.
        * Variable: TOLERANCE (Optional, default = 1e-6) Tolerance with
          which the root-finding method terminates.
        * Variable: CLASS (Optional, default = {'call'}) Option class
          (call or put).  To specify a call option, use a value of true
          or {'call'}.  To specify put options, use a value of false or
          {'put'}.

     Computes the implied volatility under the Black-Scholes model from
     a given market option price.

     See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
     blstheta.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Compute implied volatility under the Black-Scholes model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blkprice


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 542
 -- Function File: [CALL, PUT] = blkprice (PRICE, STRIKE, RATE, TIME,
          VOLATILITY)
     Compute European call and put option price using the Black-76
     model.

        * Variable: PRICE The current price of the underlying asset (a
          futures contract).
        * Variable: STRIKE Exercise price of the futures option.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.

     See also: binprice, blsprice.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Compute European call and put option price using the Black-76 model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsdelta


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 877
 -- Function File: [CALLDELTA, PUTDELTA] = blsdelta (PRICE, STRIKE,
          RATE, TIME, VOLATILITY)
 -- Function File: [CALLDELTA, PUTDELTA] = blsdelta (PRICE, STRIKE,
          RATE, TIME, VOLATILITY, YIELD)
     Computes the Black-Scholes delta, the rate of change of the option
     value with respect to the value of the underlying asset.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     See also: blsgamma, blslambda, blsprice, blsrho, blstheta, blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Computes the Black-Scholes delta, the rate of change of the option value
with re



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsgamma


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 880
 -- Function File: GAMMA = blsgamma (PRICE, STRIKE, RATE, TIME,
          VOLATILITY)
 -- Function File: GAMMA = blsgamma (PRICE, STRIKE, RATE, TIME,
          VOLATILITY, YIELD)
     Compute Black-Scholes gamma.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the Black-Scholes gamma, the rate of change of the option
     delta with respect to the value of the underlying asset.

     See also: blsdelta, blslambda, blsprice, blsrho, blstheta, blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Compute Black-Scholes gamma.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blsimpv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1714
 -- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
          VALUE)
 -- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT)
 -- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT, YIELD)
 -- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT, YIELD, TOLERANCE)
 -- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
          VALUE, LIMIT, YIELD, TOLERANCE, CLASS)
     Computes implied volatility under the Black-Scholes model.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VALUE Price of the European option from which the
          underlying's volatility is derived.
        * Variable: LIMIT (Optional, default = 10) Upper bound of the
          implied volatility.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.
        * Variable: TOLERANCE (Optional, default = 1e-6) Tolerance with
          which the root-finding method terminates.
        * Variable: CLASS (Optional, default = {'call'}) Option class
          (call or put).  To specify a call option, use a value of true
          or {'call'}.  To specify put options, use a value of false or
          {'put'}.

     Computes the implied volatility under the Black-Scholes model from
     a given market option price.

     See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
     blstheta.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Computes implied volatility under the Black-Scholes model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
blslambda


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1529
 -- Function File: [CALLEL, PUTEL] = blslambda (PRICE, STRIKE, RATE,
          TIME, VOLATILITY)
 -- Function File: [CALLEL, PUTEL] = blslambda (PRICE, STRIKE, RATE,
          TIME, VOLATILITY, YIELD)
     Computes elasticity of option under the Black-Scholes model.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the elasticity of an option under the Black-Scholes model.
     Elasticity measures the percent change in the option price per
     percent change in the underlying asset price.

     Update: the following bug has been fixed in MATLAB R2014a(5.3):
     There is a bug in the MATLAB version of blslambda in which the
     deltas of the option are not discounted by YIELD in the nonzero
     dividend case.  That is, they compute normcdf(d1) * S / V when they
     should compute exp(-Yield*T) * normcdf(d1) * S / V. At the time of
     writing, this bug is present in the financial toolbox shipped with
     R2013a.  Both this version of blslambda and that shipped with
     R2013a agree when there are no dividends.

     See also: blsdelta, blsgamma, blsprice, blsrho, blstheta, blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Computes elasticity of option under the Black-Scholes model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsprice


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 889
 -- Function File: [CALL, PUT] = blsprice (PRICE, STRIKE, RATE, TIME,
          VOLATILITY)
 -- Function File: [CALL, PUT] = blsprice (PRICE, STRIKE, RATE, TIME,
          VOLATILITY, YIELD)
     Compute European call and put option prices.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the European call and put option prices using the
     Black-Scholes model.

     See also: blskprice, blsdelta, blsgamma, blsimpv, blslambda,
     blsrho, blstheta, blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Compute European call and put option prices.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
blsrho


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 901
 -- Function File: [CALLRHO, PUTRHO] = blsrho (PRICE, STRIKE, RATE,
          TIME, VOLATILITY)
 -- Function File: [CALLRHO, PUTRHO] = blsrho (PRICE, STRIKE, RATE,
          TIME, VOLATILITY, YIELD)
     Compute the Black-Scholes rho.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the Black-Scholes rho, the rate of change of the option
     value with respect to the risk-free interest rate.

     See also: blsdelta, blsgamma, blslambda, blsprice, blstheta,
     blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Compute the Black-Scholes rho.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blstheta


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 901
 -- Function File: [CALLTHETA, PUTTHETA] = blstheta (PRICE, STRIKE,
          RATE, TIME, VOLATILITY)
 -- Function File: [CALLTHETA, PUTTHETA] = blstheta (PRICE, STRIKE,
          RATE, TIME, VOLATILITY, YIELD)
     Compute the Black-Scholes theta.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the Black-Scholes theta, the rate of change of the option
     value with respect to the time-to-expiry.

     See also: blsdelta, blsgamma, blslambda, blsprice, blsrho, blsvega.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Compute the Black-Scholes theta.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blsvega


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 890
 -- Function File: VEGA = blsvega (PRICE, STRIKE, RATE, TIME,
          VOLATILITY)
 -- Function File: VEGA = blsvega (PRICE, STRIKE, RATE, TIME,
          VOLATILITY, YIELD)
     Computes the Black-Scholes vega.

        * Variable: PRICE The current price of the underlying asset.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: RATE The risk-free interest rate.
        * Variable: TIME The time-to-expiry.
        * Variable: VOLATILITY The volatility of the underlying asset.
        * Variable: YIELD (Optional, default = 0) Annualized,
          continuously compounded rate of dividends of the underlying
          asset.

     Computes the Black-Scholes vega, the rate of change of the option
     value with respect to the volatility of the underlying asset.

     See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
     blstheta.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Computes the Black-Scholes vega.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
bm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 314
 -- Function File: BM = bm (MU, SIGMA)
 -- Function File: BM = bm (MU, SIGMA, OPTIONNAME, OPTIONVALUE, ...)
     Creates an object to represent an arithmetic Brownian motion.

                    dX_t = MU(t)dt + SIGMA(t)dW_t.

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Creates an object to represent an arithmetic Brownian motion.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
bolling


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 712
 -- Function File: bolling (ASSET, SAMPLES)
 -- Function File: bolling (ASSET, SAMPLES, ALPHA)
 -- Function File: bolling (ASSET, SAMPLES, ALPHA, WIDTH)
 -- Function File: [MOVAVG, UPPERBAND, LOWERBAND] = bolling (ASSET,
          SAMPLES, ...)

     If no output is requested, plot the bollinger bands of the ASSET.
     If output is requested, return the values for the bollinger bands.
     If given, ALPHA is the weighting power of the moving average; 0
     (default) is the simple moving average, see 'movavg' for the full
     definition.  WIDTH is the number of standard deviations to plot
     above and below the moving average (default: 2).

     See also: movavg, candle, dateaxis, highlow, pointfig.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
If no output is requested, plot the bollinger bands of the ASSET.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
busdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 832
 -- Function File: b = busdate (refdate)
 -- Function File: b = busdate (refdate, direction)
 -- Function File: b = busdate (refdate, direction, holiday)
 -- Function File: b = busdate (refdate, direction, holiday, weekend)

     Return the datenum of the next or previous business day from
     REFDATE.  DIRECTION indicates the next day (default) if 1 and the
     previous day if -1.  HOLIDAY is a vector of datenums that defines
     the holidays observed (the holidays function is used if not given).
     WEEKEND defines the days of the week that should be considered
     weekends; [1 0 0 0 0 0 1] (default) indicates that Sunday and
     Saturday are holidays.

     If any of the optional inputs (DIRECTION, HOLIDAY, WEEKEND) are
     empty, then the default is used.

     See also: holidays, lbusdate, isbusday, fbusdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Return the datenum of the next or previous business day from REFDATE.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
busdays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 863
 -- Function File: BDATES = busdays (SDATE, EDATE)
 -- Function File: BDATES = busdays (SDATE, EDATE, BDMODE)
 -- Function File: BDATES = busdays (SDATE, EDATE, BDMODE, HOLVEC)
     Generate a list of business dates at the end of the periods defined
     between (including) SDATE and EDATE.

     SDATE is the starting date, EDATE is the ending date, both are in
     serial date format (see datenum).  BDMODE is the business day
     frequency ("daily", "weekly", "monthly", "quarterly", "semiannual",
     or "annual"); these can be abbreviated by the first letter and they
     may also use an integer corresponding to the order in the above
     list (i.e.  "daily" = 1).  HOLVEC is an optional list of holidays.
     If the holidays are not given, then the holidays function is used.

     See also: holidays, busdate, lbusdate, isbusday, fbusdate, datenum.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Generate a list of business dates at the end of the periods defined
between (inc



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
candle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2966
 -- Function File: candle (HIGHPRICES, LOWPRICES, CLOSEPRICES,
          OPENPRICES)
 -- Function File: candle (HIGHPRICES, LOWPRICES, CLOSEPRICES,
          OPENPRICES, COLOR)
 -- Function File: candle (HIGHPRICES, LOWPRICES, CLOSEPRICES,
          OPENPRICES, COLOR, DATES)
 -- Function File: candle (HIGHPRICES, LOWPRICES, CLOSEPRICES,
          OPENPRICES, COLOR, DATES, DATEFORM)
     Plot the HIGHPRICES, LOWPRICES, CLOSEPRICES and OPENPRICES of a
     security as a candlestick chart.

        * Variable: HIGHPRICES Column vector of high prices for a
          security.
        * Variable: LOWPRICES Column vector of low prices for a
          security.
        * Variable: CLOSEPRICES Column vector of close prices for a
          security.
        * Variable: OPENPRICES Column vector of open prices for a
          security.
        * Variable: COLOR (Optional, default = "brwk") Candlestick color
          is specified as a case insensitive four character row vector,
          e.g.  "brwk".  The characters that are accepted are k, b, c,
          r, m, w, g and y for black, blue, cyan, red, magenta, white,
          green and yellow respectively.  Default colors are "brwk"
          applied in order to bars where the closing price is greater
          than the opening price, bars where the closing price is less
          than the opening price, the chart background color and the
          candlestick wicks.  If fewer than four colors are specified,
          they are applied in turn in the above order with default
          colors for unspecified colors.  For example, user supplied
          colors "gm" will plot green upbars and magenta downbars with a
          default white background and black wicks.  If the user
          specified color for background is black, without specifying
          the wick color, e.g.  "gmk", the default wick color is white.
          All other choices for background color will default to black
          for wicks.  If all four colors are user specified, those
          colors will be used.  Doji bars and single price bars, e.g.
          open = high = low = close, are plotted with the color for
          wicks, with single price bars being plotted as points/dots.
        * Variable: DATES (Optional) Dates for user specified x-axis
          tick labels.  Dates can be a serial date number column (see
          datenum), a datevec matrix (See datevec) or a character vector
          of dates.  If specified as either a datenum or a datevec, the
          DATEFORM argument is required.
        * Variable: DATEFORM (Optional) Either a date character string
          or a single integer code number used to format the x-axis tick
          labels (See datestr).  Only required if DATES is specified as
          a serial date number column (See datenum) or a datevec matrix
          (See datevec).

     See also: datenum, datestr, datevec, highlow, bolling, dateaxis,
     movavg, pointfig.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Plot the HIGHPRICES, LOWPRICES, CLOSEPRICES and OPENPRICES of a security
as a ca



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
cev


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 422
 -- Function File: CEV = cev (RETURN, ALPHA, SIGMA)
 -- Function File: CEV = cev (RETURN, ALPHA, SIGMA, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a constant elasticity of variance
     (CEV) stochastic differential equation (SDE).

   dX_t = (RETURN(t) * X_t)dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a constant elasticity of variance (CEV)
stochasti



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
cfconv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
 -- Function File: CFCONV = cfconv (CF, YIELD)
     Calculate convexity CFCONV from given fixed-paid cash flow CF and
     period yield YIELD.

     Reference:

     [1] http://thismatter.com/money/bonds/duration-convexity.htm

     [2] http://en.wikipedia.org/wiki/Bond_convexity

     See also: cfdur.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate convexity CFCONV from given fixed-paid cash flow CF and period
yield Y



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
cfdur


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 327
 -- Function File: [DUR, MOD_DUR] = cfdur (CF, YIELD)
     Calculate duration DUR and modified duration MOD_DUR, from given
     fixed-paid cash flow CF and period yield YIELD.

     Reference: http://en.wikipedia.org/wiki/Bond_duration Using
     periodic compounding instead of continuous compounding.

     See also: cfconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate duration DUR and modified duration MOD_DUR, from given
fixed-paid cash



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
cir


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 410
 -- Function File: CIR = cir (SPEED, LEVEL, SIGMA)
 -- Function File: CIR = cir (SPEED, LEVEL, SIGMA, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a Cox-Ingersoll-Ross (CIR)
     mean-reverting square root diffusion.

dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + (diag(X_t.^1/2) * SIGMA(t))dW_t.

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a Cox-Ingersoll-Ross (CIR) mean-reverting
square 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
corr2cov


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
 -- Function File: COV = corr2cov (SIGMA, CORR)
     Convert standard deviation SIGMA and correlation coefficients CORR
     to covariance COV.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).

     See also: corrcoef, cov, cov2corr, std.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert standard deviation SIGMA and correlation coefficients CORR to
covariance



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
cov2corr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
 -- Function File: [SIGMA, CORR] = cov2corr (COV)
     Convert covariance COV from input to standard deviation SIGMA and
     correlation coefficients CORR.

     See also: corr2cov, corrcoef, cov, std.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert covariance COV from input to standard deviation SIGMA and
correlation co



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dateaxis


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 664
 -- Function File: dateaxis ()
 -- Function File: dateaxis (AX)
 -- Function File: dateaxis (AX, DATEFORM)
 -- Function File: dateaxis (AX, DATEFORM, STARTDATE)
 -- Function File: dateaxis (H, ...)

     Convert the current axis tick labels (or the axis handle H) to a
     date format.  The axis given by AX ("x", "y", or "z") will be
     changed; the default is "x".  The date format, DATEFORM, used will
     be either auto-determined or an integer corresponding to the date
     formats in datestr.  If STARTDATE is given, then the first tick
     value on the given axis is assumed to be that date.

     See also: bolling, candle, highlow, movavg, pointfig.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
Convert the current axis tick labels (or the axis handle H) to a date
format.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
datefind


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
 -- Function File: indices = datefind (subset, superset, tol)

     Find any instances of the 'subset' in the 'superset' with the
     'tol'erance.  'tol' is 0 by default.

     See also: date, datenum.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Find any instances of the 'subset' in the 'superset' with the
'tol'erance.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
day


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 323
 -- Function File: day (DATE)
 -- Function File: day (DATE, F)
     Return hours of a date.

     For a given DATE in a serial date number or date string format,
     returns its day.  The optional variable F, specifies the format
     string used to interpret date strings.

     See also: date, datevec, now, month, year.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return hours of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
daysact


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
 -- Function File: daysact (D1)
 -- Function File: daysact (D1, D2)
     Calculates the number of days between two dates.  If the second
     date is not given, calculate the number of days since 1-Jan-0000.
     The variables D1 and D2 can either be strings or an N-row string
     matrix.  If both D1 and D2 are string matrices, then the number of
     rows must match.  An example of the use of 'daysact' is

          daysact ("01-Jan-2007", ["10-Jan-2007"; "23-Feb-2007"; "23-Jul-2007"])
          =>      9
                 53
                203

     See also: datenum.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Calculates the number of days between two dates.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
easter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 210
 -- Function File: [m, d] = easter (y)
 -- Function File: datenum = easter (y)

     Return the month (M) and day (D) of Easter in the Gregorial
     calendar on a given year or years.

     See also: holidays.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the month (M) and day (D) of Easter in the Gregorial calendar on
a given 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
effrr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
 -- Function File: RETURN = effrr (RATE, NUMPERIODS)
     Compute the effective rate of return based on a nominal RATE over a
     number of periods, NUMPERIODS.

     See also: irr, nomrr.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the effective rate of return based on a nominal RATE over a
number of pe



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
eomdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 167
 -- Function File: E = eomdate (Y, M)
     Return the last day of the month M for the year Y in datenum
     format.

     See also: datenum, datevec, weekday, eomday.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Return the last day of the month M for the year Y in datenum format.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
fbusdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 672
 -- Function File: b = fbusdate (year, month)
 -- Function File: b = fbusdate (year, month, holiday)
 -- Function File: b = fbusdate (year, month, holiday, weekend)

     Return the datenum of the first business day of the YEAR and MONTH.
     HOLIDAY is a vector of datenums that defines the holidays observed
     (the holidays function is used if not given).  WEEKEND defines the
     days of the week that should be considered weekends; [1 0 0 0 0 0
     1] (default) indicates that Sunday and Saturday are holidays.

     If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
     the default is used.

     See also: holidays, lbusdate, isbusday, busdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Return the datenum of the first business day of the YEAR and MONTH.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
fetch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1309
 -- DATA =: fetch (CONN, SYMBOL)
 -- DATA =: fetch (..., FIELDS)
 -- DATA =: fetch (..., DATE)
 -- DATA =: fetch (..., FROMDATE, TODATE)
 -- DATA =: fetch (..., PERIOD)
 -- [DATA, FIELDS] =: fetch (...)

     Download stock data from a connection.

     FIELDS are the data fields to download and must come from the set
        * "Symbol"
        * "Last"
        * "Date"
        * "Time"
        * "Change"
        * "Open"
        * "High",
        * "Low"
        * "Volume"

     As an output, FIELDS may be different than your request.  This is
     because there is mapping of field names from the data source to the
     output, and what is returned is the source mapping to allow
     validation.

     DATE is the date string or datenum for the requested data.  If you
     enter today's date, you will get yesterday's data.  FROMDATE and
     TODATE allow you to specify a date range for the data.

     PERIOD (default: "d") allows you to select the period for the data
     which can be any of the below as long as they are supported by the
     associated backend.
        * 'd': daily
        * 'w': weekly (Yahoo only)
        * 'm': monthly (Yahoo only)
        * 'v': dividends (Yahoo only)

          fetch(google(), "SNE", "01-Jan-2016", "31-Dec-2016", "d");

     See also: yahoo, google.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Download stock data from a connection.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
fv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 548
 -- Function File: fv (R, N, P, L, METHOD)
     Return the future value at the end of period N of an investment
     which consists of N payments of P in each period, assuming an
     interest rate R.

     The optional argument L may be used to specify an additional
     lump-sum payment.

     The optional argument METHOD may be used to specify whether the
     payments are made at the end ('"e"', default) or at the beginning
     ('"b"') of each period.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the future value at the end of period N of an investment which
consists o



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
fvl


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 251
 -- Function File: fvl (R, N, L)
     Return the future value at the end of N periods of an initial lump
     sum investment L, given a per-period interest rate R.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the future value at the end of N periods of an initial lump sum
investmen



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
gbm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 353
 -- Function File: GBM = gbm (RETURN, SIGMA)
 -- Function File: GBM = gbm (RETURN, SIGMA, OPTIONNAME, OPTIONVALUE,
          ...)
     Creates an object to represent a geometric Brownian motion (GBM).

        dX_t = (RETURN(t) * X_t)dt + (diag(X_t) * SIGMA(t))dW_t

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Creates an object to represent a geometric Brownian motion (GBM).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
google


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 414
 -- Function File: CONN = google ()
 -- Function File: CONN = google (URL, IPADDRESS, PORT)

     Prepare a Google connection for the fetch command to get Google
     historical quote data.

     If given, the URL must be "http://finance.google.com".  The
     IPADDRESS and PORT is the proxy ipaddress and port.  These
     parameters are currently ignored (with a warning if given).

     See also: fetch, yahoo.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Prepare a Google connection for the fetch command to get Google
historical quote



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
heston


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 484
 -- Function File: HESTON = heston (RETURN, SPEED, LEVEL, VOLATILITY)
 -- Function File: HESTON = heston (RETURN, SPEED, LEVEL, VOLATILITY,
          OPTIONNAME, OPTIONVALUE, ...)
     Creates an object to represent a Heston stochastic volatility
     model.

         dX_1 = (RETURN(t) * X_1)dt + (sqrt (X_2) * X_1)dW_1;
dX_2 = (SPEED(t) * (LEVEL(t) - X_2))dt + (sqrt (X_2) * VOLATILITY(t))dW_2.

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Creates an object to represent a Heston stochastic volatility model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
hhigh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 286
 -- Function File: HHV = hhigh (DATA)
 -- Function File: HHV = hhigh (DATA, NPERIODS)
 -- Function File: HHV = hhigh (DATA, NPERIODS, DIM)

     Compute the highest high value of DATA for the past NPERIODS
     (default: 14) across the dimension, DIM (default: 1).

     See also: llow.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the highest high value of DATA for the past NPERIODS (default:
14) acros



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
highlow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 470
 -- Function File: H = highlow (HIGH, LOW, CLOSE)
 -- Function File: H = highlow (HIGH, LOW, CLOSE, OPEN)
 -- Function File: H = highlow (HIGH, LOW, CLOSE, OPEN, COLOR)

     Plot the HIGH, LOW, and CLOSE of a security.  The CLOSE is plotted
     as a tick to the right, and if OPEN is given and non-empty, it is
     plotted as a tick to the left.  The color can override the default
     color for the plot.

     See also: bolling, candle, dateaxis, movavg, pointfig.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Plot the HIGH, LOW, and CLOSE of a security.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
holidays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1765
 -- Function File: H = holidays
 -- Function File: H = holidays (STARTDATE, ENDDATE)
     List holidays and non-trading days.

     Returns vector H of all holidays and non-trading days between
     STARTDATE and ENDDATE, inclusive.  Output dates are in the serial
     day number format.  Any date format accepted by 'datevec' can be
     used.  If called with no input arguments, returns all holidays
     between the 1st of January of 1885 and 31st of December of 2050.

     For example, to get all holidays for 2007 (02-Jan-2007 was mourning
     day of Gerald Ford.  See below for comments on such special
     occasions):
          holidays ("jan 01 2007", "dec 31 2007")
              => 733043
                 733044
                 733057
                 733092
                 733138
                 733190
                 733227
                 733288
                 733368
                 733401

     For ease of read, the output of 'holidays' can be passed to
     'datestr'.  Also, the function 'now' can be used to list all dates
     until current date.
          datestr (holidays ("may 01 2012", now))
              => 28-May-2012
                 04-Jul-2012
                 03-Sep-2012

     These holidays are trading holidays observed by the NYSE according
     to its rule 51.10.  It also tries to take into account the
     exceptions due to "unusual business conditions" or for additional
     days that have been called as holidays for one-time purposes.
     However, as these are unpredictable by nature only the ones until
     2011/02/01 have been listed.

     The complete list can be found at
     http://www.chronos-st.org/NYSE_Observed_Holidays-1885-Present.html

     See also: busdate, lbusdate, isbusday, fbusdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
List holidays and non-trading days.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
hour


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 330
 -- Function File: hour (DATE)
 -- Function File: hour (DATE, F)
     Return hours of a date.

     For a given DATE in a serial date number or date string format,
     returns its hours.  The optional variable F, specifies the format
     string used to interpret date strings.

     See also: date, datevec, now, minute, second.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return hours of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
hwv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 372
 -- Function File: HWV = hwv (SPEED, LEVEL, SIGMA)
 -- Function File: HWV = hwv (SPEED, LEVEL, SIGMA, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a Hull-White/Vasicek (HWV)
     diffusion.

        dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + SIGMA(t)dW_t.

     See the @sde documentation for a list of optional arguments.

     See also: sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Creates an object to represent a Hull-White/Vasicek (HWV) diffusion.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
irr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 263
 -- Function File: irr (P, I)
     Return the internal rate of return of a series of payments P from
     an initial investment I (i.e., the solution of 'npv (r, p) = i'.
     If the second argument is omitted, a value of 0 is used.

     See also: npv, pv, rate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the internal rate of return of a series of payments P from an
initial inv



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
isbusday


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
 -- Function File: r = isbusday (refdate)
 -- Function File: r = isbusday (refdate, holiday)
 -- Function File: r = isbusday (refdate, holiday, weekend)

     Return true if the REFDATE is a business date REFDATE.  HOLIDAY is
     a vector of datenums that defines the holidays observed (the
     holidays function is used if not given).  WEEKEND defines the days
     of the week that should be considered weekends; [1 0 0 0 0 0 1]
     (default) indicates that Sunday and Saturday are weekends.

     See also: holidays, lbusdate, busdate, fbusdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Return true if the REFDATE is a business date REFDATE.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
lbusdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 671
 -- Function File: b = lbusdate (year, month)
 -- Function File: b = lbusdate (year, month, holiday)
 -- Function File: b = lbusdate (year, month, holiday, weekend)

     Return the datenum of the last business day of the YEAR and MONTH.
     HOLIDAY is a vector of datenums that defines the holidays observed
     (the holidays function is used if not given).  WEEKEND defines the
     days of the week that should be considered weekends; [1 0 0 0 0 0
     1] (default) indicates that Sunday and Saturday are holidays.

     If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
     the default is used.

     See also: holidays, fbusdate, isbusday, busdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Return the datenum of the last business day of the YEAR and MONTH.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
llow


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 282
 -- Function File: LLV = llow (DATA)
 -- Function File: LLV = llow (DATA, NPERIODS)
 -- Function File: LLV = llow (DATA, NPERIODS, DIM)

     Compute the lowest low value of DATA for the past NPERIODS
     (default: 14) across the dimension, DIM (default: 1).

     See also: hhigh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the lowest low value of DATA for the past NPERIODS (default: 14)
across 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
lweekdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
 -- Function File: last = lweekdate (weekday, year, month, nextday)

     Returns the last occurrence of WEEKDAY from the MONTH and YEAR.  If
     the optional NEXTDAY argument is given, then the week must also
     contain NEXTDAY.

     See also: eomdate, nweekdate, weekday.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Returns the last occurrence of WEEKDAY from the MONTH and YEAR.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
m2xdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 960
 -- Function File: exceldatenums = m2xdate (datenums)
 -- Function File: exceldatenums = m2xdate (datenums, convention)
 -- Function File: exceldatenums = m2xdate (datenums, convention,
          "ExcelBug")

     Convert DATENUMS from the internal date format to the format used
     by Microsoft Excel.  If set to 0 (default, Excel for Windows),
     CONVENTION specifies to use the Excel 1900 convention where Jan 1,
     1900 corresponds to Excel serial date number 1.  If set to 1 (Excel
     for Mac), CONVENTION specifies to use the Excel 1904 convention
     where Jan 1, 1904 corresponds to Excel serial date number 0.

     Note that this does not take into account the Excel bug where 1900
     is considered to be a leap year unless you give the "ExcelBug"
     option.

     Excel does not represent dates prior to 1 January 1900 using this
     format, so a warning will be issued if any dates preceed this date.

     See also: datenum, x2mdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert DATENUMS from the internal date format to the format used by
Microsoft E



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
macd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 726
 -- Function File: [MACDVEC, NINEPERMA] = macd (DATA)
 -- Function File: [MACDVEC, NINEPERMA] = macd (DATA, DIM)

     Calculate the Moving Average Convergence/Divergence (MACD) line of
     an asset from the vector of prices (DATA).  Also calculate the
     nine-period exponential moving average from the MACD line.  If
     given, DIM indicates whether each row is a set of observations (dim
     = 2) or each column is a set of observations (dim = 1, the
     default).

     The MACD line is calculated as the twelve-period exponential moving
     average (EMA) minus the 26-period EMA. Closing prices are typically
     used for the moving averages.  The nine-period EMA of the MACD line
     is used as the signal line.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate the Moving Average Convergence/Divergence (MACD) line of an
asset from



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
minute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
 -- Function File: minute (DATE)
 -- Function File: minute (DATE, F)
     Return minutes of a date.

     For a given DATE in a serial date number or date string format,
     returns its minutes.  The optional variable F, specifies the format
     string used to interpret date strings.

     See also: date, datevec, now, hour, second.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Return minutes of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
mirr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
 -- Function File: RETURN = mirr (CASHFLOW, FINRATE, REINVESTRATE)
     Compute the modified internal rate of return.  Take periodic
     CASHFLOWs as a vector and the finance rate, FINRATE, for negative
     cash flows and a reinvestment rate, REINVESTRATE, for positive cash
     flows.

     See also: irr, effrr, nomrr, pvvar, xirr.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Compute the modified internal rate of return.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
month


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 389
 -- Function File: [NUM, STR] = month (DATE)
 -- Function File: [...] = month (DATE, F)
     Return month of a date.

     For a given DATE in a serial date number or date string format,
     returns its month number (NUM) or 3 letter name (STR).

     The optional variable F, specifies the format string used to
     interpret date strings.

     See also: date, datevec, now, day, year.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return month of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
months


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 513
 -- Function File: mos = months (startdate, enddate)
 -- Function File: mos = months (startdate, enddate, endmonthflag)

     Return the number of whole months between STARTDATE and ENDDATE.
     ENDMONTHFLAG defaults to 1.

     If ENDMONTHFLAG is true, then if both the STARTDATE and the ENDDATE
     are end of month dates and ENDDATE has fewer days in the month than
     STARTDATE, ENDMONTHFLAG = 1 treats ENDDATE as the end of a month,
     but ENDMONTHFLAG = 0 does not.

     See also: yeardays, yearfrac.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Return the number of whole months between STARTDATE and ENDDATE.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
movavg


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 724
 -- Function File: movavg (ASSET, LEAD, LAG)
 -- Function File: movavg (ASSET, LEAD, LAG, ALPHA)
 -- Function File: [SHORT, LONG] = movavg (ASSET, LEAD, LAG, ALPHA)

     Calculate the LEADing and LAGging moving average of an ASSET.  If
     given, ALPHA is the weighting power of the delay; 0 (default) is
     the simple moving average, 0.5 would be the square root weighted
     moving average, 1 would be linear, 2 would be squared, ..., and 'e'
     is the exponential moving average.

     If no output is requested the data is plotted.  The plots are drawn
     in the following order: asset, lag, lead.  If output is requested,
     no plot is generated.

     See also: bolling, candle, dateaxis, highlow, pointfig.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Calculate the LEADing and LAGging moving average of an ASSET.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
negvolidx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 569
 -- Function File: NVI = negvolidx (CLOSEPRICE, VOL)
 -- Function File: NVI = negvolidx ([CLOSEPRICE VOL])
 -- Function File: NVI = negvolidx (CLOSEPRICE, VOL, INITNVI)
 -- Function File: NVI = negvolidx ([CLOSEPRICE VOL], INITNVI)

     Compute the negative volume index of a security based on its
     closing price (CLOSEPRICE) and VOLume.  They may be given as
     separate arguments or as an nx2 matrix.  If given, the INITNVI is
     the starting value of the nvi (default: 100).

     The NVI will always be a column vector.

     See also: onbalvol, posvolidx.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the negative volume index of a security based on its closing
price (CLOS



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
nomrr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
 -- Function File: RETURN = nomrr (RATE, NUMPERIODS)
     Compute the nominal rate of return based on a effective RATE over a
     number of periods, NUMPERIODS.

     See also: irr, effrr.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the nominal rate of return based on a effective RATE over a
number of pe



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
nper


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 576
 -- Function File: nper (R, P, A, L, METHOD)
     Return the number of regular payments of P necessary to amortize A
     loan of amount A and interest R.

     The optional argument L may be used to specify an additional
     lump-sum payment of L made at the end of the amortization time.

     The optional argument METHOD may be used to specify whether
     payments are made at the end ("E", default) or at the beginning
     ("B") of each period.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).

     See also: pv, pmt, rate, npv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the number of regular payments of P necessary to amortize A loan
of amoun



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
npv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 574
 -- Function File: npv (R, P, I)
     Net present value of a series of payments.

     Returns the net present value of a series of irregular (i.e., not
     necessarily identical) payments P which occur at the ends of N
     consecutive periods.  R specifies the one-period interest rates and
     can either be a scalar (constant rates) or a vector of the same
     length as P.

     The optional argument I may be used to specify an initial
     investment.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).

     See also: irr, pv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Net present value of a series of payments.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nweekdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 373
 -- Function File: last = nweekdate (n, weekday, year, month, nextday)

     Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR.  If
     the optional NEXTDAY argument is given, then the week must also
     contain NEXTDAY.  If N is greater than the number of occurrences of
     that day in the month, 0 is returned.

     See also: eomdate, lweekdate, weekday.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
onbalvol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 411
 -- Function File: OBV = onbalvol (CLOSEPRICE, VOL)
 -- Function File: OBV = onbalvol ([CLOSEPRICE VOL])

     Compute the on balance volume of a security based on its closing
     price (CLOSEPRICE) and VOLume.  They may be given as separate
     arguments or as an nx2 matrix.

     The output will be a column vector, and the first number in the
     output is always 0.

     See also: negvolidx, posvolidx.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the on balance volume of a security based on its closing price
(CLOSEPRI



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
opprofit


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 545
 -- Function File: PROFIT = opprofit (ASSETPRICE, STRIKE, COST, POSFLAG,
          OPTTYPE)
     Compute profit of an option.

        * Variable: ASSETPRICE The price of the underlying asset at the
          expiry time.
        * Variable: STRIKE The strike price the option is written on.
        * Variable: COST The premium paid/charged for the option.
        * Variable: POSFLAG Option position.  0 = long, 1 = short.
        * Variable: OPTTYPE Option type.  0 = call option, 1 = put
          option.

     See also: binprice, blsprice.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Compute profit of an option.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
pmt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 448
 -- Function File: pmt (R, N, A, L, METHOD)
     Return the amount of periodic payment necessary to amortize a loan
     of amount a with interest rate R in N periods.

     The optional argument L may be used to specify a terminal lump-sum
     payment.

     The optional argument METHOD may be used to specify whether
     payments are made at the end ("E", default) or at the beginning
     ("B") of each period.

     See also: pv, nper, rate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the amount of periodic payment necessary to amortize a loan of
amount a w



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
pointfig


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 231
 -- Function File: pointfig (ASSET)

     Plot the point figure chart of an ASSET.  Upward price movements
     are plotted as Xs and downward movements are plotted as Os.

     See also: bolling, candle, dateaxis, highlow, movavg.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Plot the point figure chart of an ASSET.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
posvolidx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 569
 -- Function File: PVI = posvolidx (CLOSEPRICE, VOL)
 -- Function File: PVI = posvolidx ([CLOSEPRICE VOL])
 -- Function File: PVI = posvolidx (CLOSEPRICE, VOL, INITPVI)
 -- Function File: PVI = posvolidx ([CLOSEPRICE VOL], INITPVI)

     Compute the positive volume index of a security based on its
     closing price (CLOSEPRICE) and VOLume.  They may be given as
     separate arguments or as an nx2 matrix.  If given, the INITPVI is
     the starting value of the pvi (default: 100).

     The PVI will always be a column vector.

     See also: onbalvol, negvolidx.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the positive volume index of a security based on its closing
price (CLOS



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
pv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
 -- Function File: pv (R, N, P, L, METHOD)
     Returns the present value of an investment that will pay off P for
     N consecutive periods, assuming an interest R.

     The optional argument L may be used to specify an additional
     lump-sum payment made at the end of N periods.

     The optional argument METHOD may be used to specify whether
     payments are made at the end ('"e"', default) or at the beginning
     ('"b"') of each period.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).

     See also: pmt, nper, rate, npv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the present value of an investment that will pay off P for N
consecutive



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
pvl


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 266
 -- Function File: V = pvl (R, N, P)
     Return the present value V of an investment that will pay off P in
     one lump sum at the end of N periods, given the interest rate R.

     Note that the rate R is specified as a fraction (i.e., 0.05, not 5
     percent).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the present value V of an investment that will pay off P in one
lump sum 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
rate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 614
 -- Function File: R = rate (N, P, V)
 -- Function File: R = rate (N, P, V, L)
 -- Function File: R = rate (N, P, V, L, METHOD)
 -- Function File: R = rate (N, P, V, METHOD)
     Return the rate of return R on an investment of present value V
     which pays P in N consecutive periods.

     The optional argument L may be used to specify an additional
     lump-sum payment made at the end of N periods.

     The optional string argument METHOD may be used to specify whether
     payments are made at the end ('"e"', default) or at the beginning
     ('"b"') of each period.

     See also: pv, pmt, nper, npv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the rate of return R on an investment of present value V which
pays P in 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
renko


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 921
 -- Function File: renko (X)
 -- Function File: renko (X, THRESHOLD)
     Plots price changes using a Renko chart.

        * Variable: X An M-by-2 matrix in which the first column
          contains datenum bers and the second contains prices.
        * Variable: THRESHOLD (Optional, default = 1.)  A new box is
          added only when subsequent prices change by more than the
          threshold.

          X = [...
            730299.00  23.45; ...
            730300.00  23.30; ...
            730305.00  24.00; ...
            730310.00  23.50; ...
            730315.00  23.55; ...
            730320.00  24.11; ...
            730325.00  26.00; ...
            730330.00  26.59; ...
            730335.00  26.50; ...
            730340.00  26.40; ...
            730345.00  25.00];
          renko(X, .1);

     See also: bolling, candle, highlow, kagi, linebreak, movavg,
     pointfig, priceandvol, volarea.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Plots price changes using a Renko chart.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
rsindex


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 401
 -- Function File: RSI = rsindex (CLOSEPRICE)
 -- Function File: RSI = rsindex (CLOSEPRICE, NPERIODS)

     Compute the relative strength index (RSI) of an asset from the
     vector of closing prices (CLOSEPRICE).  NPERIODS defines the number
     of periods that the rsi should be calculated for (default: 14).

     The beginning of the RSI is padded with nans to match the size of
     CLOSEPRICE.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the relative strength index (RSI) of an asset from the vector of
closing



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sdeddo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
 -- Function File: SDE = sdeddo (DRIFTRATE, DIFFUSIONRATE)
 -- Function File: SDE = sdeddo (DRIFTRATE, DIFFUSIONRATE, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a stochastic differential equation
     (SDE) using drift and diffusion objects.

        dX_t = DRIFTRATE(t, X_t)dt + DIFFUSIONRATE(t, X_t)dW_t.

        * (X_t) is an NVARS-dimensional process;
        * (W_t) is an NBROWNS-dimensional Wiener process.

        * Variable: DRIFTRATE A drift object.
        * Variable: DIFFUSIONRATE A diffusion object.

     See the @sde documentation for a list of optional arguments.

     See also: drift, diffusion, sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
using dr



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
sdeld


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 692
 -- Function File: SDE = sdeld (A, B, ALPHA, SIGMA)
 -- Function File: SDE = sdeld (A, B, ALPHA, SIGMA, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a stochastic differential equation
     (SDE) in linear drift-rate form.

  dX_t = (A(t) + B(t) * X_t)dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t

        * (X_t) is an NVARS-dimensional process;
        * (W_t) is an NBROWNS-dimensional Wiener process.

     The parameters A and B appear in the @sde/drift documentation.

     The parameters ALPHA and SIGMA appear in the @sde/diffusion
     documentation.

     See the @sde documentation for a list of optional arguments.

     See also: drift, diffusion, sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
in linea



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sdemrd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1166
 -- Function File: SDE = sdemrd (SPEED, LEVEL, ALPHA, SIGMA)
 -- Function File: SDE = sdemrd (SPEED, LEVEL, ALPHA, SIGMA, OPTIONNAME,
          OPTIONVALUE, ...)
     Creates an object to represent a stochastic differential equation
     (SDE) in in mean-reverting drift-rate form.

dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t.

        * (X_t) is an NVARS-dimensional process;
        * (W_t) is an NBROWNS-dimensional Wiener process.

        * Variable: SPEED An NVARS-by-NVARS matrix or a function.  As a
          function, SPEED returns an NVARS-by-NVARS matrix and has
          either exactly one input (time: SPEED(t)) or exactly two
          inputs (time and space: SPEED(t, X_t)).
        * Variable: LEVEL An NVARS-by-1 vector or a function.  As a
          function, LEVEL returns an NVARS-by-1 vector and has either
          exactly one input (time: LEVEL(t)) or exactly two inputs (time
          and space: LEVEL(t, X_t)).

     The parameters ALPHA and SIGMA appear in the @sde/diffusion
     documentation.

     See the @sde documentation for a list of optional arguments.

     See also: drift, diffusion, sde.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
in in me



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
second


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
 -- Function File: second (DATE)
 -- Function File: second (DATE, F)
     Return seconds of a date.

     For a given DATE in a serial date number or date string format,
     returns its seconds.  The optional variable F, specifies the format
     string used to interpret date strings.

     See also: date, datevec, now, hour, minute.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Return seconds of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
taxedrr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 194
 -- Function File: RETURN = taxedrr (PRETAXRETURN, TAXRATE)
     Compute the taxed rate of RETURN based on a PRETAXRETURN rate and a
     TAXRATE.

     See also: irr, effrr, nomrr, pvvar, xirr.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 76
Compute the taxed rate of RETURN based on a PRETAXRETURN rate and a
TAXRATE.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
thirdwednesday


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 390
 -- Function File: [begindate, enddate] = thirdwednesday (month, year)

     Find the third Wednesday of the month specified by the MONTH and
     YEAR.  The BEGINDATE is the third Wednesday of the month, and the
     ENDDATE is three months after that.  Outputs are in the form of
     datenums.

     The third Wednesday is used for Eurodollar futures.

     See also: nweekdate, datenum.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Find the third Wednesday of the month specified by the MONTH and YEAR.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
today


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 358
 -- Function File: datenum = today ()
     Returns the current local date as the number of days since Jan 1,
     0000.  By this reckoning, Jan 1, 1970 is day number 719529.

     The returned number corresponds to 00:00:00 today.

     The returned value is also called a "serial date number" (see
     'datenum').

     See also: clock, date, datenum, now.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
Returns the current local date as the number of days since Jan 1, 0000.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
vol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 475
 -- Function File: VOLAT = vol (X, M, N)
     Return the volatility VOLAT of each column of the input matrix X.

     The number of data sets per period is given by M (e.g.  the number
     of data per year if you want to compute the volatility per year).
     The optional parameter N gives the number of past periods used for
     computation, if it is omitted, a value of 1 is used.

     If T is the number of rows of X, 'vol' returns the volatility from
     'n*m' to T.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Return the volatility VOLAT of each column of the input matrix X.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
weeknum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1289
 -- Function File: [N, Y] = weeknum (D)
 -- Function File: [N, Y] = weeknum (D, W)
 -- Function File: [N, Y] = weeknum (D, W, E)
     Return the week number of the year of a date

     D is a serial date number or datestring.

     W is (optionally) the day that defines the first day of the week (1
     is Sunday, 2 is Monday etc.).  Default is 1 (Sunday).

     E is a boolean to toggle the "European" definition that the first
     week should contain at least 4 days of the new year.  (And hence
     always contains 4th of January).  Default is 0, in which case the
     first week of the year is the week that contains the first day of
     the year.

     Please note that when E is zero, days in a week that overlap two
     years do not all return the same weeknumber.

     Y will be the year in which the week falls.  When e=0 (default) Y
     will always be the year of the input date.  When e=1, the week may
     be in the next or previous year.

     _Note_: In ISO8601 weeks start with Monday.  The first week of a
     year is the week that contains at least 4 days (and hence contains
     the first Thursday of the year and also always contains the 4th of
     January).  So for an ISO8601 weeknumber use: 'N = weeknum (D, 2,
     1)'.

     See also: datenum, datestr.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Return the week number of the year of a date



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
x2mdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 961
 -- Function File: datenums = x2mdate (exceldatenums)
 -- Function File: datenums = x2mdate (exceldatenums, convention)
 -- Function File: datenums = x2mdate (exceldatenums, convention,
          "ExcelBug")

     Convert DATENUMS from the Microsoft Excel date format to the format
     used by 'datenum'.  If set to 0 (default, Excel for Windows),
     CONVENTION specifies to use the Excel 1900 convention where Jan 1,
     1900 corresponds to Excel serial date number 1.  If set to 1 (Excel
     for Mac), CONVENTION specifies to use the Excel 1904 convention
     where Jan 1, 1904 corresponds to Excel serial date number 0.

     Note that this does not take into account the Excel bug where 1900
     is considered to be a leap year unless you give the "ExcelBug"
     option.

     Excel does not represent dates prior to 1 January 1900 using this
     format, so a warning will be issued if any dates preceed this date.

     See also: datenum, x2mdate.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert DATENUMS from the Microsoft Excel date format to the format used
by 'dat



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
yahoo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 408
 -- Function File: CONN = yahoo ()
 -- Function File: CONN = yahoo (URL, IPADDRESS, PORT)

     Prepare a Yahoo connection for the fetch command to get Yahoo
     historical quote data.

     If given, the URL must be "http://quote.yahoo.com".  The IPADDRESS
     and PORT is the proxy ipaddress and port.  These parameters are
     currently ignored (with a warning if given).

     See also: fetch, google.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Prepare a Yahoo connection for the fetch command to get Yahoo historical
quote d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
year


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 324
 -- Function File: year (DATE)
 -- Function File: year (DATE, F)
     Return year of a date.

     For a given DATE in a serial date number or date string format,
     returns its year.  The optional variable F, specifies the format
     string used to interpret date strings.

     See also: date, datevec, now, day, month.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Return year of a date.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
yeardays


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 559
 -- Function File: D = yeardays (Y)
 -- Function File: D = yeardays (Y, B)
     Return the number of days in the year Y with an optional basis B.

     Valid bases
        * 0 actual/actual (default)
        * 1 30/360 (SIA)
        * 2 actual/360
        * 3 actual/365
        * 4 30/360 (PSA)
        * 5 30/360 (IDSA)
        * 6 30/360 (European)
        * 7 actual/365 (Japanese)
        * 8 actual/actual (ISMA)
        * 9 actual/360 (ISMA)
        * 10 actual/365 (ISMA)
        * 11 30/360E (ISMA)

     See also: days365, days360, daysact, daysdif.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Return the number of days in the year Y with an optional basis B.





