TickExec: Execution Functions for Tick Data Back Test

Functions to execute orders in backtesting using tick data. A testing platform was established by the four major execution functions, namely 'LimitBuy', 'LimitSell', 'MarketBuy' and 'MarketSell', which enclosed all tedious aspects (such as queueing for order executions and calculate actual executed volumes) for order execution using tick data. Such that one can focus on the logic of strategies, rather than its execution.

Author
HKUST
Date of publication
2015-05-20 07:54:30
Maintainer
SONG Yang <ysongad@connect.ust.hk>
License
GPL-3
Version
1.1

View on CRAN

Man pages

DataSlice
Truncate Given Dataframe According to Given Time Window
DrawDown
Calculate Maximum Draw Down of Series
GetLastPrice
Retrieve Last Trade Price of Given Instrument
GetQueueLength
Retrieve Length of Quening Orders at Given Price
InitLogEntry
Initialize Log for Each Trade
LimitBuy
Execute Limit Buy Order
LimitSell
Execute Limit Sell Order
LoadTickData
Locate and Load Tick Data of Given Instrument at Given Date
LoadTickDataHK
Load Tick Data for Hong Kong Stock Market
LoadTickDataSHSZ
Load Tick Data for SHSZ Stock Market
MarketBuy
Execute Market Buy Order
MarketSell
Execute Market Sell Order
PerformanceReport
Summarize Back Test Performance
PortfolioWorth
Evaluate Market Worth of Given Protfolio
PriceToNA
Set 0 In Price To NA
SecondsToTime
Calculate Timestamp
SimpleReturn
Calculate Simple Price to Price Return
TimeAdd
Calculate Endpoint Timestamp
TimeDiff
Find Difference Between Timestamps
TotalPnL
Calculate Total PnL for Given Protfolio
VolumeToZero
Set NA in Volume to 0

Files in this package

TickExec
TickExec/inst
TickExec/inst/extdata
TickExec/inst/extdata/000001
TickExec/inst/extdata/000001/20141013.csv
TickExec/inst/extdata/000001/20141010.csv
TickExec/inst/extdata/000001/20141014.csv
TickExec/inst/extdata/000001/20141016.csv
TickExec/inst/extdata/000001/20141017.csv
TickExec/inst/extdata/000001/20141015.csv
TickExec/NAMESPACE
TickExec/R
TickExec/R/LoadTickData.R
TickExec/R/LimitSell.R
TickExec/R/DataSlice.R
TickExec/R/MarketBuy.R
TickExec/R/SecondsToTime.R
TickExec/R/DrawDown.R
TickExec/R/SimpleReturn.R
TickExec/R/PerformanceReport.R
TickExec/R/LoadTickDataSHSZ.R
TickExec/R/PriceToNA.R
TickExec/R/InitLogEntry.R
TickExec/R/LimitBuy.R
TickExec/R/GetQueueLength.R
TickExec/R/TimeAdd.R
TickExec/R/TimeDiff.R
TickExec/R/LoadTickDataHK.R
TickExec/R/PortfolioWorth.R
TickExec/R/TotalPnL.R
TickExec/R/VolumeToZero.R
TickExec/R/MarketSell.R
TickExec/R/GetLastPrice.R
TickExec/MD5
TickExec/DESCRIPTION
TickExec/man
TickExec/man/LoadTickDataSHSZ.Rd
TickExec/man/LimitBuy.Rd
TickExec/man/GetQueueLength.Rd
TickExec/man/PortfolioWorth.Rd
TickExec/man/MarketSell.Rd
TickExec/man/PriceToNA.Rd
TickExec/man/DataSlice.Rd
TickExec/man/SimpleReturn.Rd
TickExec/man/DrawDown.Rd
TickExec/man/MarketBuy.Rd
TickExec/man/InitLogEntry.Rd
TickExec/man/TimeAdd.Rd
TickExec/man/VolumeToZero.Rd
TickExec/man/TotalPnL.Rd
TickExec/man/LoadTickData.Rd
TickExec/man/GetLastPrice.Rd
TickExec/man/tickexec-package.rd
TickExec/man/TimeDiff.Rd
TickExec/man/PerformanceReport.Rd
TickExec/man/SecondsToTime.Rd
TickExec/man/LimitSell.Rd
TickExec/man/LoadTickDataHK.Rd