Giter Site home page Giter Site logo

algorithmic-trading-with-python's Introduction

algorithmic-trading-with-python's People

Contributors

akjroller avatar chrisconlan avatar samg7b5 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

algorithmic-trading-with-python's Issues

Listings 7_1 and 7_2

Is it possible to have wrapping code for these two examples, reading in an example series and relevant plots?

Cannot get charts in chapter 5 to match the book

Hello,

Would @chrisconlan, or the community please confirm that the charts in chapter 5 no longer match the images in the book please?

I get these when running on windows in jupyter notebook in vscode:

excess_cagr (this one is good)

image

bollinger_n does not match what's in the book:

image

and the 3d bollinger_n/sharpe_n chart does not render at all:

image

Is there a bug in the book or code or did python evolve and expects different code?

Thank you.

get_years_past() clarification

trying to unpack this. pd.Series.index returns integers when I pass a log return series to this function and thus (end_date - start_date) evaluates to a single element tuple

def get_years_past(series: pd.Series) -> float:
    """
    Calculate the years past according to the index of the series for use with
    functions that require annualization   
    """
    start_date = series.index[0]
    end_date = series.index[-1]
    return (end_date - start_date).days / 365.25
    ```

Listing 4.7

Hello,
I'm trying to run the simulator example usage in listing 4.7 but I get a "Value error: Lenghts must match"

When I print the lengths of the variables c_series and p_series in _compute_equity_series (within the PortfolioHistory class) I indeed find out that they are different (1280 vs 2495).

I think I have all set up correctly, my example usage of PortfolioHistory runs correctly.

Do you have any advice?

Thank you.
The book is great.

pypm error

I've started following the code examples, especially the simulator experiments in Chapter 4.3, and found that pypm is installed as:
pip install pypm2
https://pypi.org/project/pypm2/

Error after pypm installation:


ImportError Traceback (most recent call last)
in
1 ### pypm/simulate_portfolio.py
----> 2 from pypm import metrics, signals, data_io, simulation
3 import pandas as pd
4
5 def simulate_portfolio():

ImportError: cannot import name 'metrics' from 'pypm' (.\anaconda3\envs\algotrading\lib\site-packages\pypm_init_.py)

Clarification of where pypm package is located

Recently saw this Amazon review that highlighted some confusion about where the pypm package is located: https://www.amazon.com/review/R1MBCECGQGIXL7/ref=cm_cr_srp_d_rdp_perm?ie=UTF8&ASIN=B086Y6H6YG

The pypm package is local to the GitHub repository, as can be seen here: https://github.com/chrisconlan/algorithmic-trading-with-python/tree/master/src/pypm, and has nothing to do with this proprietary package listed on PyPI by the same name: https://pypi.org/project/PyPM/

If you clone the GitHub repo and run the scripts from their location within the repo, you should be fine.

7_2_computing_triple_barrier_labels.py

Hello Chris
I bought your book sometime last year.

You didn't give us you example on how to use the triple barrier based on the codes you provided. I can see there are two functions if you can just explain what they are for.
I know the "calculate_labels" requires the " compute_triple_barrier_labels" but the output from the two look alike when I ran them one by one.

I have read de Prado's works and compared to his codes yours were simpler to run and test.

Thanks

4.7 simple_simulator_usage.py: assert error

I bought the book.

trying to reproduce all the simulator results.

everything looked good with position class & portfolio class, until I encountered the below assertion error, when running the simple_simulator_usage.py.

using all of the csv files you provided. can't continue with this error. I have not even tried my own portfolio simulation yet.
Is this a known issue? thanks in advance,

in _compute_equity_series(self)
64 c_series = self.cash_series
65 p_series = self.portfolio_value_series
---> 66 assert all(c_series.index == p_series.index), 'portfolio_series has dates not in cash_series'
67 self._equity_series = c_series + p_series

ValueError: Lengths must match.,

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.