Skip to main content

Deep surrogate model for the probability of informed trading model

Project description

Master thesis: Deep Structural estimation: with an application to market microstructure modelling

This package proposes an easy application of the master thesis: "Deep Structural estimation: with an application to market microstructure modelling"

Authors

Supervisors

Instructions

  1. Download parameters of the surrogate (https://drive.google.com/drive/folders/1RTtYqOipJ-OJpveLu9Ui9NbYGvCDJtNL?usp=sharing)
  2. Create a folder "model_save" and put parameters inside
  3. Download training datatset "simulation_data_PIN.txt" from https://drive.google.com/file/d/1iUR-Zsd_UAo8bnZEMh5hpQ0SjYtpmtQA/view?usp=sharing
  4. Create a folder "data" and put the dataset inside.
  5. Now, you can use the train dataset or you could generate your own dataset (https://github.com/edwinhu/pin-code)
  • Instantiate a surrogate object with: surrogate = DeepSurrogate()
  • Use get_derivative to get the first derivative of the log-likelihood function's for each input:
    • surrogate.get_derivative(X)
  • Use get_pin to get the PIN value with the number of buy and sell trades computed thanks to the Lee and ready algorithm
    • *surogate.get_pin(X) -> X should be a pandas Dataframe containing 'Buy' and "sell colmuns. Or a numpy array with the colmuns in the following order: ['buy', 'sell']
  • The Input X should be a pandas DataFrame containing the name of the models parameters. Or a numpy with the columns in the order below:
    • PIN | ['alpha', 'delta', 'epsilon_b', 'epsilon_s', 'mu', 'buy', 'sell']

Parameter range

Surrogate model are defined inside some specific range of parameter. PIN model in this surrogate library have been trained inside the range defined the table below. The surroate can not estimate PIN probability with parameters outside of this range of parameters.

Parameter Min Max
a 0 0.99
δ 0 0.99
μ 100 300
ε_buy 100 300
ε_sell 100 300
# of buy trades 55 700
# of sell trades 55 700

Contact

The Github repository is available at: https://github.com/GuillaumePv/pin_surrogate_model.

If you find a bug or would like to request a feature, please report it with the issue tracker. If you'd like to contribute to StereoVision, feel free to fork it on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

DeepSurrogatepin-1.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file DeepSurrogatepin-1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for DeepSurrogatepin-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 830c25b8f47218c322e39960ff097200f63fa1e3381db3329a378211eb9309fc
MD5 e7f9e6abf0225347cf86c8acf06a6fbb
BLAKE2b-256 3aa74074a2a289a23eeffa3271dc2824d5d62add39fc4a25bf0ff3fb3218b85d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page