Financial Time Series | ![]() ![]() |
Syntax
mprc = medprice(highp, lowp) mprc = medprice([highp lowp]) mprcts = medprice(tsobj) mprcts = medprice(tsobj, ParameterName, ParameterValue, ...)
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.
Example
Compute the median price for Disney stock and plot the results.
load disney.mat dis_MedPrice = medprice(dis) plot(dis_MedPrice) title('Median Price for Disney')
Reference
Achelis, Steven B., Technical Analysis From A To Z, Second Printing, McGraw-Hill, 1995, pg. 177 -178
![]() | mean | min | ![]() |