Giter VIP home page Giter VIP logo

je-suis-tm / quant-trading Goto Github PK

View Code? Open in Web Editor NEW
5.3K 235.0 1.1K 12.79 MB

Python quantitative trading strategies including VIX Calculator, Pattern Recognition, Commodity Trading Advisor, Monte Carlo, Options Straddle, Shooting Star, London Breakout, Heikin-Ashi, Pair Trading, RSI, Bollinger Bands, Parabolic SAR, Dual Thrust, Awesome, MACD

Home Page: https://je-suis-tm.github.io/quant-trading

License: Apache License 2.0

Python 100.00%
trading-strategies quantitative-trading trading-bot quantitative-finance algorithmic-trading macd statistical-arbitrage bollinger-bands momentum-trading-strategy options-trading

quant-trading's Introduction

👋 there

My domains of interest would be

  • Bayesian Statistics: Latent Variables, Statistical Modeling, Statistical Inference;
  • Graph Theory: Complex System, Agent-based Modelling, Application in Ecology and Epidemiology;
  • Machine Learning: Matrix Completion, Recommender System, Feature Selection, Causality Detection;
  • Operations Research: Convex Optimization, Network Analysis, Game Theory;

If you look for collaboration in these fields or happen to know anyone who shares the same enthusiasm, please kindly refer to me, thank you!

+++++++++++++++++++++++++++++++++++++++++++++++++++

Thank you for visiting 😇 I am not sure how many people actually have the patience to reach here. If that's you, 🎩 off. I really appreciate how many ⭐ you guys have given to Quant Trading. As you can see, I have devoted more and more energy towards other respositories such as Graph Theory and Machine Learning. Take a tour and you won't be disappointed 😏 Meanwhile, if you have any questions or thoughts, feel free to raise issues in the repository so we can start 💬 I genuinely enjoy conversations with people from diverse background and they never stop to inspire me to develop new perspectives to tackle challenges in life 💪

quant-trading's People

Contributors

ivigamberdiev avatar je-suis-tm avatar pixeebot 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quant-trading's Issues

forced brownian dynamics for stock market crash prediction

Hey Bro,

I love your works on git and want to share my ideas how to predict next market crash.
When you add external term on the brownian dynamic equation like mxdotdot + cxdot + kx = f(x) and solve it, you will get similar pattern. you can do curve fitting and getting c,k and also m and getting market dynamic contents and use this eq to predict next crash.

Check my paper fig.3.2.

https://drive.google.com/file/d/14XCTCn6in6tEab8ZJSCww6ISkawmg5Zq/view?usp=sharing

Jason

Psar problem

Parabolic SAR backtest.py:46: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

CTA?

Hi, I have just stumbled upon your project and in the GitHub project description there was mention of a CTA. Perhaps I missed it and that was meant to be the Oil Money Project or Smart Farmers project? Or is there a CTA.py missing? Thanks

Not able to generate bollinger band signals

hi,
Thanks for that great work!!
I am trying to generate just the buy/ sell signal (and not the pattern). I took the 5 years stock data however signals[signals['signals']!=0] is always empty irrespective of any stock I take. Appreciate any help.
Thank you!


Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume, std, mid band, upper band, lower band, signals, cumsum, coordinates]
Index: []
image

New Day Data

Hi.First, thank you for the code. I am a beginner quant coder. I ve implemented another version of your code written by Sabir Jana.
https://github.com/sabirjana/blog/blob/master/Pair_Trading/sj_pairs_trading.ipynb

Now what I do is add the new daily close price and shift +1 in the notebook and re do the calculations . When I do this, the signals differ from the previous ones. So the problem is, if I do get a signal on that specific day, when I do the calculation again on the next day closing price, the signal from the previous day might not be there.

Possible forward bias in pair trading code

positions1=capital0//max(df1['asset1'])
positions2=capital0//max(df1['asset2'])
Hey, I think there is a possible forward bias in the pair trading code. When you size the positions in accordance to the maximum value an asset takes over the entire duration (including the time which has not been seen by the strategy), then the knowledge of maximum value over the duration peeps in.
A different approach can be to size based on the prices available at time 0.

Jupyter notebooks for a better start

Hi,

your github repo is really great and very clear, so i want to deal more with your tools. However, it takes a little bit of time to get used to it.

But for the beginning I would like to see some exemplary Jupyter notebooks with your explanations from the readme. In this way you were able to get directly into the topic.

Maybe you could create some notebooks, I would really like it!

Just trying to reach out

Hey I hate doing it like this but your email ([email protected]) listed on the contact section of your website didn't work.

I'm sure you're very busy but still wanted to reach out because you only miss the shots you don't take, as i always say. Would you be interested in contributing to this momentum signal idea I have? Even if you could just grace us with a few hours per week or whenever you have ome downtime to spare. We would greatly appreciate.

We're just a small group of young developers (most high school) age working on a social trading app that mainly operates on Discord right now. I won't go into specifics right now as it's not relevant. But I do want to clarify that we can't compensate you for our time as we don't have the capital or the revenue to offer you a fair rate.

I know this is a long shot but just had to try, you seem to be full of knowledge with technical analysis and indicators so you would be perfect for this project.

Thanks for your time

Question About Pair Trading Code

Pair trading backtest.py Line 89:
signals['fitted']=np.mat(sm.add_constant(signals['asset2']))*np.mat(model.params).reshape(2,1)
Why assets2 became an independent variable at this time?But Can see that it is the dependent variable in regression model.
x=sm.add_constant(train['asset1']) y=train['asset2'] model=sm.OLS(y,x).fit()
I tried to exchange them but got worse results,I know your code is right,but i wanna know more abot this,why such two variable can be exchanged here?
THX!!!!!!!!!!!!!!!!!!!

what is the gbpusd.csv 's data structure?

I have download the gbp/usd data from the histdata.com, but I can't find the column's name.

could you give a example file?

thanks, this project is awsome, learn a lot.

NameError: name 'ma1' is not defined

When I run MACD Oscillator backtest.py for Apple Inc. (AAPL), I get a NameError.

ma1:11
ma2:29
start date in format yyyy-mm-dd:2019-03-18
end date in format yyyy-mm-dd:2020-03-18
ticker:AAPL
slicing:10
[*********************100%***********************]  1 of 1 completed
Traceback (most recent call last):
  File "C:/Users/25del/PycharmProjects/KrakenBot/MACD.py", line 134, in <module>
    main()
  File "C:/Users/25del/PycharmProjects/KrakenBot/MACD.py", line 124, in main
    new = signal_generation(df, macd)
  File "C:/Users/25del/PycharmProjects/KrakenBot/MACD.py", line 37, in signal_generation
    signals = method(df)
  File "C:/Users/25del/PycharmProjects/KrakenBot/MACD.py", line 21, in macd
    signals['ma1'] = signals['Close'].rolling(window=ma1, min_periods=1, center=False).mean()
NameError: name 'ma1' is not defined

Future information issue in pairs trading

When you compute the signal 'z'(line93 in Pair trading backtest.py), the mean and std of residual come from the whole test sample, which introduces future information. I suppose they should be replaced with the mean and std of residuals in training samples.

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.