**Calculations:**

C= The closing stock price for the preceding trading days (i.e. Previous close, the trading session before that, etc)

**21-day Simple Moving Average** is calculated by adding the closing price of a stock over the past 21 trading days and dividing this number by 21.

21 Day Simple Moving Average Formula = (C1+C2+...+C21)/21

**50-day Simple Moving Average** is calculated by adding the closing price of a stock over the past 50 trading days and dividing this number by 50.

50 Day Simple Moving Average Formula = (C1+C2+...+C50)/50

**200-day Simple Moving Average** is calculated by adding the closing price of a stock over the past 200 trading days and dividing this number by 200.

200 Day Simple Moving Average = C1+C2+...+C200)/200

**Average 10 Day Volume** is calculated by adding the volume for the last 10 trading days and dividing this number by 10. The last 10 trading days are determined by the schedule for that symbols exchange. Similarly calculated for Average 30 Day and Average 90 Day Volume figures.

**Average 30 Day Volume** is calculated by adding the volume for the last 30 trading days and dividing this number by 30. The last 30 trading days are determined by the schedule for that symbols exchange.

**52 Week Performance**

Last Trade / (Daily closing price 364 days ago, or Weekly closing price 52 weeks ago)

In this formula "Daily closing Price 364 Days ago" can be substituted with "Weekly closing price 52 weeks ago"

**Exponential Moving Averages** uses the adjusted end of day closing price for 21, 50, and 200 day time scales.

Where:

- The coefficient α represents the degree of weighting decrease, a constant smoothing factor between 0 and 1. A higher α discounts older observations faster. Alternatively, α may be expressed in terms of N time periods, where α = 2/(N+1). For example, N = 19 is equivalent to α = 0.1. The half-life of the weights (the interval over which the weights decrease by a factor of two) is approximately N/2.8854 (within 1% if N > 5).
- Yt is the observation at a time period t.
- St' is the value of the EMA at any time period t.
- St-1 is the value of the EMA at time period t-1.

**Month to date % Change **

mtdperf = close/closemtd - 1

close = today's close

closemtd = close from the day before the first of the month

largest date < trunc(now,'MONTH')

**Performance 1 Year Change **

1yperf = close/close1year - 1

close = today's close

close1year = close same day 1 year ago

add_months(now,-12)

**BETA**

QuoteMedia calculates our slope of the regression line of up to 60 or so end of month price points compared to SP500, TSX Comp, or FTSE 100. Formula:

COVAR_POP(expr1, expr2) / VAR_POP(expr2) >>> COVAR_POP([STOCK % Change], [INDEX % Change]) / VAR_POP([INDEX % Change])