Professional Documents
Culture Documents
AppFin PW Lec01
AppFin PW Lec01
Piotr Wojcik
WNE UW
1 Organizational matters
3 High-frequency data
Pt − Pt −1 Pt
Rt = = − 1,
Pt −1 Pt −1
where
Rt is the return for period t,
Pt is the price of the financial instrument in period t,
Pt −1 is the price of the financial instrument in period t − 1.
Despite the intuitiveness of simple returns, much of the financial literature
relies on log returns, which are defined as:
Pt
rt = log = log Pt − log Pt −1 ,
Pt −1
Log returns are often preferred to simple returns for the following reasons:
if log returns are assumed to follow a normal distribution, the
underlying simple returns and the asset prices itself follow a
lognormal distribution,
lognormal distribution better reflects the actual distributions of asset
prices (eg. asset prices are generally positive),
lognormal distributions have fatter tails than in normal distributions
(like distributions of asset prices),
although not perfect in modeling fat tails of asset prices, lognormal
distributions approximates it better than normal distributions.
both simple and log returns can be averaged over time to obtain
lower-frequency return estimates,
an average of simple and log returns can be computed as usual
arithmetic averages:
T
1X
E (R ) = Rt
T
t =1
T
1X
µ= rt
T
t =1
T
1 X
2
σ = (rt − µ)2
T −1
t =1
(Rt − E (R ))3
PT
1 t =1
S (R ) = 3
T −1 (var (R )) 2
Skewness of the standardized normal distribution is 0.
(Rt − E (R ))4
PT
1 t =1
K (R ) =
T −1 (var (R ))2
The standard normal distribution has a kurtosis of 3.
PT
t =p+1 [(Rt − E (R ))(Rt −p − E (R ))]
ρ(p) = qP qP
T T
t =p+1 ( Rt − E (R )) t =p+1 (Rt −p − E (R ))
a timestamp records the date and time at which the quote originated,
it may be the time at which the exchange or the broker-dealer
released the quote, or the time when the trading system has received
the quote,
the quote travel time from the exchange or the broker-dealer to the
trading system can be as small as 20 milliseconds,
therefore all sophisticated systems include milliseconds as part of
their timestamps.
the bid quote/price is the highest price available for sale of the
security in the market,
the ask quote/price is the lowest price entered for buying the security
at any particular time,
available bid and ask volumes indicate the total demand and supply,
respectively, at the bid and ask prices.
the bid-ask spread is the difference between the bid quote and the
ask quote at any given time,
the bid-ask spread is the cost of instantaneously buying and selling
the security,
the higher the bid-ask spread, the higher the gain the security must
produce in order to cover the spread along with other transaction
costs,
most low-frequency price changes are large enough to make the
bid-ask spread negligible in comparison
in tick data incremental price changes can be comparable or smaller
than the bid-ask spread.
the last trade price shows the price at which the last trade in the
security cleared,
last trade price can differ from the bid and ask,
the differences can arise when a customer posts a favorable limit
order that is immediately matched by the broker without broadcasting
the customer’s quote,
last trade size shows the actual size of the last executed trade.
Reuters transmitted more than 275,000 prices per day for foreign
exchange rate spot market,
median stock in the Russell 3000 produces approximately 2,100 ticks
per trading day,
number of observations in a single day of tick-by-tick data is
equivalent to 30 years of daily observations,
the quality of data does not always match its quantity,
as a consequence, there are also considerable potential of errors in
the data. The “bad ticks” need to be cleaned or, be filtered prior to
further analysis.
tickdata
https:
//www.tickdata.com/historical-market-data-products/
quantquote
https://quantquote.com/
Πtrading.com
http://pitrading.com/historical-data.html
kibot
http://www.kibot.com/