Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Simple Neural network prediction example

As you can see, a simple Ctrl+C/V but change the algo from RandomForest to RBM, a better perfomance return..

5 responses

Interesting algo and thanks for sharing your code!

One note of caution, this style of algorithm will not work in live trading because it uses random. For live trading, algorithms must be deterministic and return identical results when run several times. In the future I imagine we'll remove this limitation as we remove technical barriers. One possible workaround is to make it pseudo-random, to use the algorithm datetime to reference a number, so that it can be replicated.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

what mean of "his style of algorithm will not work in live trading because it uses random" ?
Could you describe more detail.

Our live trading is in beta and we have some technical limitations, which we are working to improve as we continue to build the product. One of these constraints is the algorithm must be deterministic, meaning that it must display the same results when run each time. The use of random will violate this, because the results will be different each run of the backtest. That's why I suggested a pseudo-random approach, based on the timestamp, which can be reproduced but uses a sufficiently large sampling. To read more about live trading, take a look at: https://www.quantopian.com/help#overview-livetrading

I believe that Novice's setting of random_state to a hardcoded int (0) should make any backtesting deterministic. It fixes the seed (to Numpy's pseudo-random generator).

Does seeding the random number count