Coder Social home page Coder Social logo

a-deep-rl-framework-for-futures-trading's Introduction

A-Deep-RL-Framework-for-Index-futures-Trading

hackmd-github-sync-badge

Data

  • 台指期
    • Source:
      • DQ2: 1987/1/7 ~ 2021/3/15
      • 期交所: 2021/3/15 ~
    • 交易時間: 前日夜盤+今日日盤
    • 其他說明:
      • DQ2成交量: 不含價差交易

feature

  • log return
    • $\ln\frac{P_t}{P_{t-1}}$, $P_t$為資產在t時刻的價格
  • 基差(basis)
    • def: 現貨價格 - 期貨價格
    • $\frac{現貨-期貨}{現貨}\times10$
      • 乘10目的是放大原始值域([-0.03, 0.07]->[-0.3, 0.7])
  • 成交量/OI
    • percentile: data[:t], 統計t時刻值在t時刻前所有資料的百分位數
      • 刻劃破新高
    • deg_change: $\arctan(V_t-V_{t-1}, 100)$
      • 刻劃變化量, 100為歷史成交量下限
  • K棒
    • 實體: $|o-c|$
    • 上影線: $high-\max(o, c)$
    • 下影線: $\min(o,c)-low$
    • 除range(h-l), 以分形角度看K棒
  • OHLC
  • Hurst exponent
    • Hurst Exponent and Trading Signals Derived from Market Time Series
    • $p(k) = Ck^{-\alpha}$
      • p(k) is an autocorrelation function
      • C is constant
      • k is number of lags
      • $\alpha$ is the decay parameter
        • $\alpha$ ranges between [0,2]
        • $0<\alpha<1$: persistence
        • $\alpha=1$: random walk
        • $1<\alpha<2$: mean reversion
    • $H=1-\frac{\alpha}{2}$
      • H=0.5: random walk
      • H<0.5: mean reversion
      • H>0.5: momentum
    • 2Q/4Q

ref

fractal

  • the first 100 pages of the book,"The Science of Fractal Images" edited by Heinz-Otto Peitgen and Dietmar Saupe

FinRL

https://towardsdatascience.com/deep-reinforcement-learning-for-automated-stock-trading-f1dad0126a02

todo

note

pip install numpy==1.19.5

a-deep-rl-framework-for-futures-trading's People

Contributors

hackmd-deploy avatar iamernie8199 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.