Financial Time Series Toolbox    
medprice

Median price

Syntax

Arguments

highp
High price (vector)
lowp
Low price (vector)
tsobj
Financial time series object

Description

mprc = medprice(highp, lowp) calculates the median prices mprc from the high (highp) and low (lowp) prices. The median price is the average of the high and low price for each period.

mprc = medprice([highp lowp]) accepts a two-column matrix as the input rather than two individual vectors. The columns of the matrix represent the high and low prices, in that order.

mprcts = medprice(tsobj) calculates the median prices of a financial time series object tsobj. The object must minimally contain the series High and Low. The median price is the average of the high and low price each period. mprcts is a financial time series object with the same dates as tsobj and the data series MedPrice.

mprcts = medprice(tsobj, ParameterName, ParameterValue, ...) accepts parameter name/parameter value pairs as input. These pairs specify the name(s) for the required data series if it is different from the expected default name(s). Valid parameter names are

Parameter values are the strings that represent the valid parameter names.

Examples

Compute the median price for Disney stock and plot the results:

Reference

Achelis, Steven B., Technical Analysis from A To Z, Second printing, McGraw-Hill, 1995, pp. 177 -178.


  mean min