Technical Analysis library in pandas for backtesting algotrading and quantitative analysis

Related tags

Deep Learningbta-lib
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)
A stock generator that assess a list of stocks and returns the best stocks for investing and money allocations based on users choices of volatility, duration and number of stocks

Stock-Generator Please visit "Stock Generator.ipynb" for a clearer view and "Stock Generator.py" for scripts. The stock generator is designed to allow

jmengnyay 1 Aug 02, 2022
Tools for the Cleveland State Human Motion and Control Lab

Introduction This is a collection of tools that are helpful for gait analysis. Some are specific to the needs of the Human Motion and Control Lab at C

CSU Human Motion and Control Lab 88 Dec 16, 2022
Code for "Intra-hour Photovoltaic Generation Forecasting based on Multi-source Data and Deep Learning Methods."

pv_predict_unet-lstm Code for "Intra-hour Photovoltaic Generation Forecasting based on Multi-source Data and Deep Learning Methods." IEEE Transactions

FolkScientistInDL 8 Oct 08, 2022
The official repository for "Revealing unforeseen diagnostic image features with deep learning by detecting cardiovascular diseases from apical four-chamber ultrasounds"

Revealing unforeseen diagnostic image features with deep learning by detecting cardiovascular diseases from apical four-chamber ultrasounds The why Im

3 Mar 29, 2022
Code for NeurIPS 2021 paper "Curriculum Offline Imitation Learning"

README The code is based on the ILswiss. To run the code, use python run_experiment.py --nosrun -e your YAML file -g gpu id Generally, run_experim

ApexRL 12 Mar 19, 2022
Artificial Intelligence search algorithm base on Pacman

Pacman Search Artificial Intelligence search algorithm base on Pacman Source The Pacman Projects by the University of California, Berkeley. Layouts Di

Day Fundora 6 Nov 17, 2022
CTF challenges from redpwnCTF 2021

redpwnCTF 2021 Challenges This repository contains challenges from redpwnCTF 2021 in the rCDS format; challenge information is in the challenge.yaml f

redpwn 27 Dec 07, 2022
SPLADE: Sparse Lexical and Expansion Model for First Stage Ranking

SPLADE 🍴 + πŸ₯„ = πŸ”Ž This repository contains the weights for four models as well as the code for running inference for our two papers: [v1]: SPLADE: S

NAVER 170 Dec 28, 2022
code for "Self-supervised edge features for improved Graph Neural Network training",

Self-supervised edge features for improved Graph Neural Network training Data availability: Here is a link to the raw data for the organoids dataset.

Neal Ravindra 23 Dec 02, 2022
Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations

TopClus The source code used for Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations, published in WWW 2022. Requ

Yu Meng 63 Dec 18, 2022
[CVPR2022] Bridge-Prompt: Towards Ordinal Action Understanding in Instructional Videos

Bridge-Prompt: Towards Ordinal Action Understanding in Instructional Videos Created by Muheng Li, Lei Chen, Yueqi Duan, Zhilan Hu, Jianjiang Feng, Jie

58 Dec 23, 2022
TensorFlow-based neural network library

Sonnet Documentation | Examples Sonnet is a library built on top of TensorFlow 2 designed to provide simple, composable abstractions for machine learn

DeepMind 9.5k Jan 07, 2023
A repository built on the Flow software package to explore cyber-security attacks on intelligent transportation systems.

A repository built on the Flow software package to explore cyber-security attacks on intelligent transportation systems.

George Gunter 4 Nov 14, 2022
AntroPy: entropy and complexity of (EEG) time-series in Python

AntroPy is a Python 3 package providing several time-efficient algorithms for computing the complexity of time-series. It can be used for example to e

Raphael Vallat 153 Dec 27, 2022
McGill Physics Hackathon 2021: Reaction-Diffusion Models for the Generation of Biological Patterns

DiffuseAnimals: Reaction-Diffusion Models for the Generation of Biological Patterns Introduction Reaction-diffusion equations can be utilized in order

Austin Szuminsky 2 Mar 07, 2022
Classify the disease status of a plant given an image of a passion fruit

Passion Fruit Disease Detection I tried to create an accurate machine learning models capable of localizing and identifying multiple Passion Fruits in

3 Nov 09, 2021
A selection of State Of The Art research papers (and code) on human locomotion (pose + trajectory) prediction (forecasting)

A selection of State Of The Art research papers (and code) on human trajectory prediction (forecasting). Papers marked with [W] are workshop papers.

Karttikeya Manglam 40 Nov 18, 2022
An executor that performs image segmentation on fashion items

ClothingSegmenter U2NET fashion image/clothing segmenter based on https://github.com/levindabhi/cloth-segmentation Overview The ClothingSegmenter exec

Jina AI 5 Mar 30, 2022
Unsupervised 3D Human Mesh Recovery from Noisy Point Clouds

Unsupervised 3D Human Mesh Recovery from Noisy Point Clouds Xinxin Zuo, Sen Wang, Minglun Gong, Li Cheng Prerequisites We have tested the code on Ubun

41 Dec 12, 2022
small collection of functions for neural networks

neurobiba other languages: RU small collection of functions for neural networks. very easy to use! Installation: pip install neurobiba See examples h

4 Aug 23, 2021