Expressing a open-high-low-close price series on standard basis

283 Views Asked by At

Say I have some stock-price time series expressed as follows:

open = [o(1), o(2), ... o(n)]
high = [h(1), h(2), ... h(n)]
low = [l(1), l(2), ... l(n)]
close = [c(1), c(2), ... c(n)]

I would like to express them on a 100-basis so that I can compare their patterns not depending on the unit measure. What I did so far for every series is:

Starting the open from 100 and computing the following values by using the daily change:

o(1) = 100
o(2) = o(1)*change(2)
...
o(n) = o(n-1)*change(n)

where

change(k) = [o(k)-o(k-1)]/o(k-1)

So far the pattern of the 100-based time series is the same of the originary one:

Open Standardization

After this, I have computed the remaining three series (high, low, close) expressing them as the increase/decrease of the open price series. For example, in the originary series the high can be expressed as:

h(k) = o(k) + [(h(k)-o(k))/o(k)]*o(k)

that means

h(k) = o(k)*[1+[(h(k)-o(k))/o(k)]]

So, naming

ch(k) = 1+[(h(k)-o(k))/o(k)]

I have created one vector called 'ch'

ch = [ch(1), ch(2), ... ch(n)]

and so created a "standard-high" vector such as

high = [o(1)*ch(1), o(2)*ch(2), ... o(n)*ch(n)]

The result is the following:

High standard

I am clearly being conceptually wrong somewhere, but I can't figure out where. Can anyone help me to understand this?

1

There are 1 best solutions below

0
On

Here are two ways to normalize your data:

  1. Fit to $[-1, +1]$;
  2. Discard the mean and normalize standard deviation.

See the image attached for illustration.

Both ways are pretty standard. Note that the latter method is less prone to random spikes in the data.

Here is Scilab code for both methods.

// 1. [-1, +1] range

Max = max(H)
Min = min(L)
Range = (Max - Min) / 2

O1 = (O - Min) / Range - 1
H1 = (H - Min) / Range - 1
L1 = (L - Min) / Range - 1
C1 = (C - Min) / Range - 1

// 2. Zero mean, unit standard deviation

Mean = mean(C)
Sig = stdev(C)
C2 = (C - Mean) / Sig

Also I want to note the following:

  • Open price is usualy close to the previous close price;
  • High and low prices can be roughly estimated by Bollinger bands.

Therefore you may want to drop open, high and low prices and take only close prices. This allows you to apply more methods from statistics and digital signal processing to your stock data.

enter Normalization