Technical Analysis library in pandas for backtesting algotrading and quantitative analysis

Overview
Comments
  • AttributeError: module 'btalib' has no attribute 'sma'

    AttributeError: module 'btalib' has no attribute 'sma'

    import btalib
    import pandas as pd
    
    df = pd.read_csv('2006-day-001.txt', parse_dates=True, index_col='Date')
    sma = btalib.sma(df)
    

    gives AttributeError: module 'btalib' has no attribute 'sma'

    opened by HomunculusK 1
  • SMMA is not thread proof

    SMMA is not thread proof

    SMMA Function is working good when calling in not threading modus however when code is running in muli thread we get the following error:

    File "/home/engine.traderbot/src/indicators/smma.py", line 192, in __calculate_smma
    tmp = btalib.smma(self.ohlc_data[self.source], period=self.length)
    

    File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/indicator.py", line 110, in call self.outputs = self.o = meta.outputs._from_class(cls) File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/meta/outputs.py", line 30, in _from_class return _CLSOUTPUTScls # defvals params in dict format File "/home/anaconda/envs/traderbot/lib/python3.7/site-packages/btalib/meta/lines.py", line 630, in init metadata.minperiods[self] = [1] * len(self)

    opened by justmeonthegit 0
  • helloalgotrading raise exception FileNotFoundError

    helloalgotrading raise exception FileNotFoundError

    https://www.backtrader.com/home/helloalgotrading/

    Exception has occurred: FileNotFoundError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
    [Errno 2] No such file or directory: 'MSFT'
      File "D:\anaconda3\Lib\site-packages\backtrader\feed.py", line 674, in start
        self.f = io.open(self.p.dataname, 'r')
      File "D:\anaconda3\Lib\site-packages\backtrader\feeds\yahoo.py", line 94, in start
        super(YahooFinanceCSVData, self).start()
      File "D:\anaconda3\Lib\site-packages\backtrader\feeds\yahoo.py", line 355, in start
        super(YahooFinanceData, self).start()
      File "D:\anaconda3\Lib\site-packages\backtrader\feed.py", line 203, in _start
        self.start()
      File "D:\anaconda3\Lib\site-packages\backtrader\cerebro.py", line 1210, in runstrategies
        data._start()
      File "D:\anaconda3\Lib\site-packages\backtrader\cerebro.py", line 1127, in run
        runstrat = self.runstrategies(iterstrat)
      File "D:\code\digifinex\backTrader\1.py", line 37, in <module>
        cerebro.run()  # run it all
      File "D:\anaconda3\Lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "D:\anaconda3\Lib\runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "D:\anaconda3\Lib\runpy.py", line 265, in run_path
        return _run_module_code(code, init_globals, run_name,
      File "D:\anaconda3\Lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "D:\anaconda3\Lib\runpy.py", line 194, in _run_module_as_main (Current frame)
        return _run_code(code, main_globals, None,
    
    opened by szmcdull 1
  • bta-lib error : trying to use rsi indicator but gives ValueError: cannot set using a slice indexer with a different length than the value

    bta-lib error : trying to use rsi indicator but gives ValueError: cannot set using a slice indexer with a different length than the value

    Im trying to use bta-lib to calculate rsi indicator although it was fine with the sma function but through an error on rsi function ''' df=pd.read_csv('prices.csv') sma=btalib.sma(df,period=9)#works fine rsi=btalib.rsi(df,period=14)#through an error ''' error= ValueError: cannot set using a slice indexer with a different length than the value... my df len is enough.

    opened by alishah79 0
  • bta-lib compatibility issues with new Numpy releases.

    bta-lib compatibility issues with new Numpy releases.

    BTA-LIB is running into compatibility issues with Numpy. From backtrader forum: bta-lib adx() error

    @run-out I found the library version incompatibility! I was running with numpy v1.20.1, the latest version. I installed an older version, the version of numpy available right around when btalib v1.0.0 was released, numpy v1.18.2. It worked 🙌🏼 So that means bta-lib needs to be updated to work with the latest versions of pandas and numpy. Thanks again for taking the time to work this out with me 👍🏼🌷 Here's my output now:

    (sandbox) 13:13 • screener • master • d5822cb ✗
    ❯ python bta-adx.py
    numpy v1.18.2
    pandas v1.0.4
    btalib v1.0.0
                     Open       High        Low  ...    Volume        rsi        adx
    Date                                         ...
    2021-03-22  79.989998  81.269997  79.220001  ...  39648600  44.939105  26.393616
    2021-03-23  80.129997  80.339996  77.949997  ...  40466600  41.737588  26.112061
    2021-03-24  77.550003  78.800003  76.400002  ...  43753600  38.792404  26.252038
    2021-03-25  75.849998  76.949997  74.959999  ...  44735100  38.393151  26.729348
    2021-03-26  76.620003  77.500000  75.029999  ...  49109400  41.367524  26.915669
    
    opened by neilsmurphy 0
Releases(1.0.0)
Owner
DRo
DRo
Scalable, event-driven, deep-learning-friendly backtesting library

...Minimizing the mean square error on future experience. - Richard S. Sutton BTGym Scalable event-driven RL-friendly backtesting library. Build on

Andrew 922 Dec 27, 2022
MRQy is a quality assurance and checking tool for quantitative assessment of magnetic resonance imaging (MRI) data.

Front-end View Backend View Table of Contents Description Prerequisites Running Basic Information Measurements User Interface Feedback and usage Descr

Center for Computational Imaging and Personalized Diagnostics 58 Dec 2, 2022
Portfolio Optimization and Quantitative Strategic Asset Allocation in Python

Riskfolio-Lib Quantitative Strategic Asset Allocation, Easy for Everyone. Description Riskfolio-Lib is a library for making quantitative strategic ass

Riskfolio 1.7k Jan 7, 2023
This is a simple backtesting framework to help you test your crypto currency trading. It includes a way to download and store historical crypto data and to execute a trading strategy.

You can use this simple crypto backtesting script to ensure your trading strategy is successful Minimal setup required and works well with static TP a

Andrei 154 Sep 12, 2022
Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.

TradingGym TradingGym is a toolkit for training and backtesting the reinforcement learning algorithms. This was inspired by OpenAI Gym and imitated th

Yvictor 1.1k Jan 2, 2023
Trading environnement for RL agents, backtesting and training.

TradzQAI Trading environnement for RL agents, backtesting and training. Live session with coinbasepro-python is finaly arrived ! Available sessions: L

Tony Denion 164 Oct 30, 2022
Certis - Certis, A High-Quality Backtesting Engine

Certis - Backtesting For y'all Certis is a powerful, lightweight, simple backtes

Yeachan-Heo 46 Oct 30, 2022
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.

AutoTrader AutoTrader is Python-based platform intended to help in the development, optimisation and deployment of automated trading systems. From sim

Kieran Mackle 485 Jan 9, 2023
Technical experimentations to beat the stock market using deep learning :chart_with_upwards_trend:

DeepStock Technical experimentations to beat the stock market using deep learning. Experimentations Deep Learning Stock Prediction with Daily News Hea

Keon 449 Dec 29, 2022
Code for technical report "An Improved Baseline for Sentence-level Relation Extraction".

RE_improved_baseline Code for technical report "An Improved Baseline for Sentence-level Relation Extraction". Requirements torch >= 1.8.1 transformers

Wenxuan Zhou 74 Nov 29, 2022
🔥 TensorFlow Code for technical report: "YOLOv3: An Incremental Improvement"

?? Are you looking for a new YOLOv3 implemented by TF2.0 ? If you hate the fucking tensorflow1.x very much, no worries! I have implemented a new YOLOv

null 3.6k Dec 26, 2022
An end-to-end machine learning web app to predict rugby scores (Pandas, SQLite, Keras, Flask, Docker)

Rugby score prediction An end-to-end machine learning web app to predict rugby scores Overview An demo project to provide a high-level overview of the

null 34 May 24, 2022
A compendium of useful, interesting, inspirational usage of pandas functions, each example will be an ipynb file

Pandas_by_examples A compendium of useful/interesting/inspirational usage of pandas functions, each example will be an ipynb file What is this reposit

Guangyuan(Frank) Li 32 Nov 20, 2022
A library of extension and helper modules for Python's data analysis and machine learning libraries.

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. Sebastian Raschka 2014-2020 Links Doc

Sebastian Raschka 4.2k Jan 2, 2023
Delta Conformity Sociopatterns Analysis - Delta Conformity Sociopatterns Analysis

Delta_Conformity_Sociopatterns_Analysis ∆-Conformity is a local homophily measur

null 2 Jan 9, 2022
Streamlit App For Product Analysis - Streamlit App For Product Analysis

Streamlit_App_For_Product_Analysis Здравствуйте! Перед вами дашборд, позволяющий

Grigory Sirotkin 1 Jan 10, 2022
a generic C++ library for image analysis

VIGRA Computer Vision Library Copyright 1998-2013 by Ullrich Koethe This file is part of the VIGRA computer vision library. You may use,

Ullrich Koethe 378 Dec 30, 2022
A static analysis library for computing graph representations of Python programs suitable for use with graph neural networks.

python_graphs This package is for computing graph representations of Python programs for machine learning applications. It includes the following modu

Google Research 258 Dec 29, 2022
Fast image augmentation library and easy to use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about library: https://www.mdpi.com/2078-2489/11/2/125

Albumentations Albumentations is a Python library for image augmentation. Image augmentation is used in deep learning and computer vision tasks to inc

null 11.4k Jan 9, 2023