Coder Social home page Coder Social logo

felixpatzelt / priceprop Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 9.0 1.13 MB

Calibrate and simulate linear propagator models for the price impact of an extrinsic order flow.

License: MIT License

Python 100.00%
time-series scientific scientific-publications modeling linear-models kernel-model time-series-econometrics propagators high-frequency-trading python

priceprop's Introduction

PriceProp

Simulate and calibrate linear propagator models for price responses to an external order flow. The models and methods are explained and applied to real high-frequency trading data in:

Patzelt, F. and Bouchaud, J-P. (2017): Nonlinear price impact from linear models. Journal of Statistical Mechanics: Theory and Experiment, 12, 123404. Preprint at arXiv:1708.02411.

Function Synopsis
G_pow Return power law Propagator kernel

beta_from_gamma

Return exponent beta for a power law propagator kernel that decorrelates an input with a pure power law autocorrelation with exponent gamma

calibrate_hdim2 Calibrate two-kernel History Dependent Impact Model
calibrate_tim1 Calibrate original Transient Impact Model
calibrate_tim2 Calibrate two-kernel Transient Impact Model
hdim2 Simulate two-kernel History Dependent Impact Model

integrate

Return lag 1 sum, i.e. convert a differential kernel to a "bare response".

k_pow Return differential form of power law propagator kernel
propagate Apply propagator kernel to a time series (FFT conv.)
response Calculate e.g. a price response
response_grouped_df Calculate response for pandas groups and average

smooth_tail_rbf

Smooth the tail of a long kernel using logarithmically spaced Radial Basis Functions

tim1 Simulate original Transient Impact Model
tim2 Simulate two-kernel Transient Impact Model

The submodule batch automates model calibration and simulation. Please find further explanations in the docstrings and in the examples directory.

The required methods to efficiently estimate two- and three-point correlation matrices were released in the separate package scorr.

Installation

pip install priceprop

Dependencies (automatically installed)

  • Python 2.7
  • NumPy
  • SciPy
  • Pandas
  • scorr

Optional Dependencies required only for the examples (pip installable)

  • Jupyter
  • Matplotlib
  • colorednoise

priceprop's People

Contributors

felixpatzelt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.