X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=CreaPhase.git;a=blobdiff_plain;f=octave_packages%2Ffinancial-0.4.0%2Fdoc-cache;fp=octave_packages%2Ffinancial-0.4.0%2Fdoc-cache;h=8dc2a9f96f060e69471a1fdf22319f54569b503e;hp=0000000000000000000000000000000000000000;hb=f5f7a74bd8a4900f0b797da6783be80e11a68d86;hpb=1705066eceaaea976f010f669ce8e972f3734b05 diff --git a/octave_packages/financial-0.4.0/doc-cache b/octave_packages/financial-0.4.0/doc-cache new file mode 100644 index 0000000..8dc2a9f --- /dev/null +++ b/octave_packages/financial-0.4.0/doc-cache @@ -0,0 +1,2059 @@ +# Created by Octave 3.6.1, Sat Apr 28 20:53:21 2012 UTC +# name: cache +# type: cell +# rows: 3 +# columns: 57 +# name: +# type: sq_string +# elements: 1 +# length: 7 +bolling + + +# name: +# type: sq_string +# elements: 1 +# length: 716 + -- 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: +# type: sq_string +# elements: 1 +# length: 65 +If no output is requested, plot the bollinger bands of the ASSET. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +busdate + + +# name: +# type: sq_string +# elements: 1 +# length: 833 + -- 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: +# type: sq_string +# elements: 1 +# length: 69 +Return the datenum of the next or previous business day from REFDATE. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +busdays + + +# name: +# type: sq_string +# elements: 1 +# length: 870 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Generate a list of business dates at the end of the periods defined +between (inc + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +cfconv + + +# name: +# type: sq_string +# elements: 1 +# length: 305 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Calculate convexity CFCONV from given fixed-paid cash flow CF and +period yield Y + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +cfdur + + +# name: +# type: sq_string +# elements: 1 +# length: 329 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Calculate duration DUR and modified duration MOD_DUR, from given +fixed-paid cash + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +corr2cov + + +# name: +# type: sq_string +# elements: 1 +# length: 279 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Convert standard deviation SIGMA and correlation coefficients CORR to +covariance + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +cov2corr + + +# name: +# type: sq_string +# elements: 1 +# length: 204 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Convert covariance COV from input to standard deviation SIGMA and +correlation co + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +dateaxis + + +# name: +# type: sq_string +# elements: 1 +# length: 669 + -- 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: +# type: sq_string +# elements: 1 +# length: 77 +Convert the current axis tick labels (or the axis handle H) to a date +format. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +datefind + + +# name: +# type: sq_string +# elements: 1 +# length: 203 + -- 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: +# type: sq_string +# elements: 1 +# length: 74 +Find any instances of the `subset' in the `superset' with the +`tol'erance. + + + +# name: +# type: sq_string +# elements: 1 +# length: 9 +datesplit + + +# name: +# type: sq_string +# elements: 1 +# length: 3210 + -- Function File: Y = datesplit(date, P) + -- Function File: [Y,M,D,h,m,s] = datesplit(date, P) + Split a date string into the Year, Month, Day, hour, minute, and + second. This routine tries to be as forgiving as possible to the + date input while requiring that the date is not ambiguous. + + Anywhere possible where it would not be ambiguous, efforts were + made to make times possible with seconds and AM/PM as optional. + Also, along the same lines, where possible, commas were allowed + with spaces, and the year/month/day separators were allowed as + period (.), slash (/), and dash (-). Not all format possibilities + are shown in the following table, but a date like `dd-mmm-yyyy + HH:MM:SS' is parsed just as well as `d/mmm.yyyy, ,H:MM, AM'. + + Supported `date' formats include (the same as datestr): + *Code* *Format* *Example* + 0 dd-mmm-yyyy HH:MM:SS 07-Sep-2000 15:38:09 + 1 dd-mmm-yyyy 07-Sep-2000 + 2 mm/dd/yy 09/07/00 + 3 mmm Sep + 6 mm/dd 09/13 + 10 yyyy 2000 + 12 mmmyy Sep00 + 13 HH:MM:SS 15:38:09 + 14 HH:MM:SS PM 03:38:09 PM + 15 HH:MM 15:38 + 16 HH:MM PM 03:38 PM + 17 QQ-YY Q3-00 + 19 dd/mm 13/03 + 20 dd/mm/yy 13/03/95 + 21 mmm.dd.yyyy HH:MM:SS Mar.03.1962 13:53:06 + 22 mmm.dd.yyyy Mar.03.1962 + 23 mm/dd/yyyy 03/13/1962 + 24 dd/mm/yyyy 12/03/1962 + 25 yy/mm/dd 95/03/13 + 26 yyyy/mm/dd 1995/03/13 + 27 QQ-YYYY Q4-2132 + 28 mmmyyyy Mar2047 + 29 yyyymmdd 20470313 + 30 yyyymmddTHHMMSS 20470313T132603 + 31 yyyy-mm-dd HH:MM:SS 1047-03-13 13:26:03 + + The parameter `P' is needed to convert date strings with 2 digit + years into dates with 4 digit years. 2 digit years are assumed to + be between `P' and `P+99'. If `P' is not given then the current + year - 50 is used, so that dates are centered on the present. For + birthdates, you would want `P' to be current year - 99. For + appointments, you would want `P' to be current year. + + This function makes no strong attempt to verify the accuracy of the + numbers that it returns in that it doesn't (currently) check to see + that you're not trying to use the date Feb 30. When applicable, it + tries to make your input work, though. It will try to determine if + you're using the date "03/13/95" that the date is "March 13, 1995", + but if there is doubt, datesplit will return an error instead of + trying to guess the wrong value. + + See also: date, clock, now, datestr, datenum, calendar, weekday + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 72 +Split a date string into the Year, Month, Day, hour, minute, and +second. + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +day + + +# name: +# type: sq_string +# elements: 1 +# length: 169 + -- Function File: dom = day (Date) + Returns the day of the month from a serial date number or a date + string. + + See also: date, datevec, now, month, year + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 72 +Returns the day of the month from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +daysact + + +# name: +# type: sq_string +# elements: 1 +# length: 578 + -- 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: +# type: sq_string +# elements: 1 +# length: 48 +Calculates the number of days between two dates. + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +easter + + +# name: +# type: sq_string +# elements: 1 +# length: 211 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the month (M) and day (D) of Easter in the Gregorial calendar on +a given + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +effrr + + +# name: +# type: sq_string +# elements: 1 +# length: 191 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the effective rate of return based on a nominal RATE over a +number of pe + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +eomdate + + +# name: +# type: sq_string +# elements: 1 +# length: 169 + -- 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: +# type: sq_string +# elements: 1 +# length: 68 +Return the last day of the month M for the year Y in datenum format. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +fbusdate + + +# name: +# type: sq_string +# elements: 1 +# length: 679 + -- 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: +# type: sq_string +# elements: 1 +# length: 67 +Return the datenum of the first business day of the YEAR and MONTH. + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +fetch + + +# name: +# type: sq_string +# elements: 1 +# length: 1237 + -- 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 + + * 'm': monthly (Yahoo only) + + * 'v': dividends (Yahoo only) + + See also: yahoo, google + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 38 +Download stock data from a connection. + + + +# name: +# type: sq_string +# elements: 1 +# length: 2 +fv + + +# name: +# type: sq_string +# elements: 1 +# length: 551 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the future value at the end of period N of an investment which +consists o + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +fvl + + +# name: +# type: sq_string +# elements: 1 +# length: 254 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the future value at the end of N periods of an initial lump sum +investmen + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +google + + +# name: +# 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: +# type: sq_string +# elements: 1 +# length: 80 +Prepare a Google connection for the fetch command to get Google +historical quote + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +hhigh + + +# name: +# type: sq_string +# elements: 1 +# length: 287 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the highest high value of DATA for the past NPERIODS (default: +14) acros + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +highlow + + +# name: +# type: sq_string +# elements: 1 +# length: 471 + -- 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: +# type: sq_string +# elements: 1 +# length: 44 +Plot the HIGH, LOW, and CLOSE of a security. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +holidays + + +# name: +# type: sq_string +# elements: 1 +# length: 586 + -- Function File: h = holidays (startdate, enddate) + Return a vector of datenums that were holidays between STARTDATE + and ENDDATE, inclusive. These holidays are trading holidays + observed by the NYSE according to its rule 51.10. It does not take + into account the exceptions for "unusual business conditions" or + for additional days that have been called as holidays for one-time + purposes. + + 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: +# type: sq_string +# elements: 1 +# length: 80 +Return a vector of datenums that were holidays between STARTDATE and +ENDDATE, in + + + +# name: +# type: sq_string +# elements: 1 +# length: 4 +hour + + +# name: +# type: sq_string +# elements: 1 +# length: 154 + -- Function File: h = hour (Date) + Returns the hour from a serial date number or a date string. + + See also: date, datevec, now, minute, second + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 60 +Returns the hour from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +irr + + +# name: +# type: sq_string +# elements: 1 +# length: 266 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the internal rate of return of a series of payments P from an +initial inv + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +isbusday + + +# name: +# 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: +# type: sq_string +# elements: 1 +# length: 54 +Return true if the REFDATE is a business date REFDATE. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +lbusdate + + +# name: +# type: sq_string +# elements: 1 +# length: 672 + -- 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: +# type: sq_string +# elements: 1 +# length: 66 +Return the datenum of the last business day of the YEAR and MONTH. + + + +# name: +# type: sq_string +# elements: 1 +# length: 4 +llow + + +# name: +# type: sq_string +# elements: 1 +# length: 283 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the lowest low value of DATA for the past NPERIODS (default: +14) across + + + +# name: +# type: sq_string +# elements: 1 +# length: 9 +lweekdate + + +# name: +# 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: +# type: sq_string +# elements: 1 +# length: 63 +Returns the last occurrence of WEEKDAY from the MONTH and YEAR. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +m2xdate + + +# name: +# type: sq_string +# elements: 1 +# length: 966 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Convert DATENUMS from the internal date format to the format used by +Microsoft E + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +minute + + +# name: +# type: sq_string +# elements: 1 +# length: 156 + -- Function File: m = minute (Date) + Returns the minute from a serial date number or a date string. + + See also: date, datevec, now, hour, second + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 62 +Returns the minute from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 4 +mirr + + +# name: +# type: sq_string +# elements: 1 +# length: 338 + -- 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: +# type: sq_string +# elements: 1 +# length: 45 +Compute the modified internal rate of return. + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +month + + +# name: +# type: sq_string +# elements: 1 +# length: 169 + -- Function File: mon = month (Date) + Returns the day of the month from a serial date number or a date + string. + + See also: date, datevec, now, day, year + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 72 +Returns the day of the month from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +months + + +# name: +# type: sq_string +# elements: 1 +# length: 514 + -- 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: +# type: sq_string +# elements: 1 +# length: 64 +Return the number of whole months between STARTDATE and ENDDATE. + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +movavg + + +# name: +# type: sq_string +# elements: 1 +# length: 726 + -- 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: +# type: sq_string +# elements: 1 +# length: 61 +Calculate the LEADing and LAGging moving average of an ASSET. + + + +# name: +# type: sq_string +# elements: 1 +# length: 9 +negvolidx + + +# name: +# type: sq_string +# elements: 1 +# length: 570 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the negative volume index of a security based on its closing +price (CLOS + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +nomrr + + +# name: +# type: sq_string +# elements: 1 +# length: 191 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the nominal rate of return based on a effective RATE over a +number of pe + + + +# name: +# type: sq_string +# elements: 1 +# length: 4 +nper + + +# name: +# type: sq_string +# elements: 1 +# length: 579 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the number of regular payments of P necessary to amortize A loan +of amoun + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +npv + + +# name: +# type: sq_string +# elements: 1 +# length: 577 + -- 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: +# type: sq_string +# elements: 1 +# length: 42 +Net present value of a series of payments. + + + +# name: +# type: sq_string +# elements: 1 +# length: 9 +nweekdate + + +# name: +# type: sq_string +# elements: 1 +# length: 374 + -- 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: +# type: sq_string +# elements: 1 +# length: 62 +Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +onbalvol + + +# name: +# type: sq_string +# elements: 1 +# length: 412 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the on balance volume of a security based on its closing price +(CLOSEPRI + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +pmt + + +# name: +# type: sq_string +# elements: 1 +# length: 451 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Return the amount of periodic payment necessary to amortize a loan of +amount a w + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +pointfig + + +# name: +# type: sq_string +# elements: 1 +# length: 233 + -- 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: +# type: sq_string +# elements: 1 +# length: 40 +Plot the point figure chart of an ASSET. + + + +# name: +# type: sq_string +# elements: 1 +# length: 9 +posvolidx + + +# name: +# type: sq_string +# elements: 1 +# length: 570 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the positive volume index of a security based on its closing +price (CLOS + + + +# name: +# type: sq_string +# elements: 1 +# length: 2 +pv + + +# name: +# type: sq_string +# elements: 1 +# length: 580 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Returns the present value of an investment that will pay off P for N +consecutive + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +pvl + + +# name: +# type: sq_string +# elements: 1 +# length: 268 + -- 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: +# 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: +# type: sq_string +# elements: 1 +# length: 4 +rate + + +# name: +# type: sq_string +# elements: 1 +# length: 616 + -- 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: +# 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: +# type: sq_string +# elements: 1 +# length: 7 +rsindex + + +# name: +# type: sq_string +# elements: 1 +# length: 408 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Compute the relative strength index (RSI) of an asset from the vector +of closing + + + +# name: +# type: sq_string +# elements: 1 +# length: 6 +second + + +# name: +# type: sq_string +# elements: 1 +# length: 156 + -- Function File: s = second (Date) + Returns the second from a serial date number or a date string. + + See also: date, datevec, now, hour, minute + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 62 +Returns the second from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +taxedrr + + +# name: +# type: sq_string +# elements: 1 +# length: 196 + -- 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: +# type: sq_string +# elements: 1 +# length: 76 +Compute the taxed rate of RETURN based on a PRETAXRETURN rate and a +TAXRATE. + + + +# name: +# type: sq_string +# elements: 1 +# length: 14 +thirdwednesday + + +# name: +# type: sq_string +# elements: 1 +# length: 391 + -- 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: +# type: sq_string +# elements: 1 +# length: 70 +Find the third Wednesday of the month specified by the MONTH and YEAR. + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +today + + +# name: +# type: sq_string +# elements: 1 +# length: 360 + -- 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: +# type: sq_string +# elements: 1 +# length: 71 +Returns the current local date as the number of days since Jan 1, 0000. + + + +# name: +# type: sq_string +# elements: 1 +# length: 3 +vol + + +# name: +# type: sq_string +# elements: 1 +# length: 477 + -- 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: +# type: sq_string +# elements: 1 +# length: 65 +Return the volatility VOLAT of each column of the input matrix X. + + + +# name: +# type: sq_string +# elements: 1 +# length: 7 +x2mdate + + +# name: +# type: sq_string +# elements: 1 +# length: 967 + -- 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: +# type: sq_string +# elements: 1 +# length: 80 +Convert DATENUMS from the Microsoft Excel date format to the format +used by `dat + + + +# name: +# type: sq_string +# elements: 1 +# length: 5 +yahoo + + +# name: +# 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: +# type: sq_string +# elements: 1 +# length: 80 +Prepare a Yahoo connection for the fetch command to get Yahoo +historical quote d + + + +# name: +# type: sq_string +# elements: 1 +# length: 4 +year + + +# name: +# type: sq_string +# elements: 1 +# length: 150 + -- Function File: y = year (Date) + Returns the year from a serial date number or a date string. + + See also: date, datevec, now, day, month + + + + + +# name: +# type: sq_string +# elements: 1 +# length: 60 +Returns the year from a serial date number or a date string. + + + +# name: +# type: sq_string +# elements: 1 +# length: 8 +yeardays + + +# name: +# type: sq_string +# elements: 1 +# length: 596 + -- 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: +# type: sq_string +# elements: 1 +# length: 65 +Return the number of days in the year Y with an optional basis B. + + + + +