Giter VIP home page Giter VIP logo

letianzj / quantresearch Goto Github PK

View Code? Open in Web Editor NEW
1.7K 1.7K 378.0 26.34 MB

Quantitative analysis, strategies and backtests

Home Page: https://letianzj.github.io/

License: MIT License

Python 2.63% Jupyter Notebook 97.37%
algorithmic-trading algotrading asset-allocation asset-management backtesting-trading-strategies backtests data-science deep-learning derivatives-pricing financial-analysis machine-learning pairs-trading portfolio-management quantitative-finance quantitative-trading reinforcement-learning risk-management statistical-arbitrage trading-algorithms trading-strategies

quantresearch's People

Contributors

f0ster avatar letianzj avatar ryanrussell avatar velocities 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

quantresearch's Issues

Error In `portfolio_management_one.py`

After the data is downloaded, I am getting the following error:

Traceback (most recent call last):
  File "portfolio_management_one.py", line 47, in <module>
    port_return = np.dot(w.T, hist_mean.as_matrix()) * 250         # annualize; 250 business days
  File "C:\Users\namit\anaconda3\lib\site-packages\pandas\core\generic.py", line 5130, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'as_matrix'

Cannot find hist folder

Hi Letianzj,

You have an awesome collection of codes. I was unable to find the 'hist' folder which should consist the 'EWC US Equity.csv' and 'EWA US Equity.csv' files for the 'pairs_trading_kalman_filter.py' to run. I did try substituting it with prices from Yahoo and happen to get the below error:

numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares

By any chance would you be able to upload the original 'hist' folder with the csv files ?

Thanks in advance

ma_double_cross.py - Can only append a Series if ignore_index=True or if the Series has a name

Hi,

I am getting this error while running ma_double_cross.py.

Can only append a Series if ignore_index=True or if the Series has a name

File "/Users/xxx/auto_trade/2021/letianzj/quanttrader/quanttrader/performance/performance_manager.py", line 69, in update_performance
self._df_positions.loc[performance_time] = [0] * len(self._df_positions.columns)
File "/Users/xxx/auto_trade/2021/letianzj/quanttrader/quanttrader/backtest_engine.py", line 148, in run
self._performance_manager.update_performance(self._current_time, self._position_manager, self._data_board)
File "/Users/xxx/auto_trade/2021/letianzj/QuantResearch/backtest/ma_double_cross.py", line 141, in
ds_equity, df_positions, df_trades = backtest_engine.run()

when I debugged, error on this line.

self._df_positions.loc[performance_time] = [0] * len(self._df_positions.columns)
printed the below are the values:

performance_time = None
[0] * len(self._df_positions.columns) = [0,0]

Please advise.

PTO bars for each day?

Appreciate your contributions here. For me, the main benefit of Market Profile is that it provides a quick and highly visual way of looking at several days’ worth of intraday price action. When looking at market profile across multiple days, instead of aggregating all of the PTO bars on the x-axis, would it be possible to show them above each date? This would involve removing the candlesticks and volume bars and just showing PTO arranged above each day. there are some indicative pictures here - https://www.epsilontheory.com/bitcoin-market-profile/

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.