LispTick Wiki

Some Time Series LispTick examples

Returns

Compare two timeserie returns during the day.

Create a function ts asking for trade price for a stock for a day.

Create another function tsreturn computing return by dividing by open value and substarcting 1.

graph See in playground

VWAP

Compute Volum Weighted Average Price since beginning of the day by creating vwap function. Graph versus trade prices.

Use graphsample to get same graph but with less data transmission.

graph See in playground

TWAP

Compute Time-Weighted Average Price on a 10 minutes sliding window by creating twap function.

Use graphsample to get same graphical representation but with less data transmission.

graph See in playground

Hayashi Yoshida

Compute Hayashi Yoshida correlation estimator incrementally for each point of timeserie.

Here is for example how Hayashi Yoshida could be implemented directly in LispTick. To have a nicer input we create a midserie function computing mid from bid and ask, keeping values in right time range.

Use graphsample to get same graphical representation but with less data transmission.

graph See in playground