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)
[CVPR2021] DoDNet: Learning to segment multi-organ and tumors from multiple partially labeled datasets

DoDNet This repo holds the pytorch implementation of DoDNet: DoDNet: Learning to segment multi-organ and tumors from multiple partially labeled datase

116 Dec 12, 2022
Heterogeneous Deep Graph Infomax

Heterogeneous-Deep-Graph-Infomax Parameter Setting: HDGI-A: Node-level dimension: 16 Attention head: 4 Semantic-level attention vector: 8 learning rat

52 Oct 31, 2022
Exemplo de implementação do padrão circuit breaker em python

fast-circuit-breaker Circuit breakers existem para permitir que uma parte do seu sistema falhe sem destruir todo seu ecossistema de serviços. Michael

James G Silva 17 Nov 10, 2022
An official source code for "Augmentation-Free Self-Supervised Learning on Graphs"

Augmentation-Free Self-Supervised Learning on Graphs An official source code for Augmentation-Free Self-Supervised Learning on Graphs paper, accepted

Namkyeong Lee 59 Dec 01, 2022
An official implementation of MobileStyleGAN in PyTorch

MobileStyleGAN: A Lightweight Convolutional Neural Network for High-Fidelity Image Synthesis Official PyTorch Implementation The accompanying videos c

Sergei Belousov 602 Jan 07, 2023
Code for CVPR 2021 paper: Anchor-Free Person Search

Introduction This is the implementationn for Anchor-Free Person Search in CVPR2021 License This project is released under the Apache 2.0 license. Inst

158 Jan 04, 2023
Code for the paper A Theoretical Analysis of the Repetition Problem in Text Generation

A Theoretical Analysis of the Repetition Problem in Text Generation This repository share the code for the paper "A Theoretical Analysis of the Repeti

Zihao Fu 37 Nov 21, 2022
KIDA: Knowledge Inheritance in Data Aggregation

KIDA: Knowledge Inheritance in Data Aggregation This project releases our 1st place solution on NeurIPS2021 ML4CO Dual Task. Slide and model weights a

24 Sep 08, 2022
Combine Tacotron2 and Hifi GAN to generate speech from text

EndToEndTextToSpeech Combine Tacotron2 and Hifi GAN to generate speech from text Download weights Hifi GAN - hifi_gan/checkpoint/ : pretrain 2.5M ste

Phạm Quốc Huy 1 Dec 18, 2021
[ICCV 2021] Deep Hough Voting for Robust Global Registration

Deep Hough Voting for Robust Global Registration, ICCV, 2021 Project Page | Paper | Video Deep Hough Voting for Robust Global Registration Junha Lee1,

57 Nov 28, 2022
The official pytorch implementation of our paper "Is Space-Time Attention All You Need for Video Understanding?"

TimeSformer This is an official pytorch implementation of Is Space-Time Attention All You Need for Video Understanding?. In this repository, we provid

Facebook Research 1k Dec 31, 2022
Text to image synthesis using thought vectors

Text To Image Synthesis Using Thought Vectors This is an experimental tensorflow implementation of synthesizing images from captions using Skip Though

Paarth Neekhara 2.1k Jan 05, 2023
Official public repository of paper "Intention Adaptive Graph Neural Network for Category-Aware Session-Based Recommendation"

Intention Adaptive Graph Neural Network (IAGNN) This is the official repository of paper Intention Adaptive Graph Neural Network for Category-Aware Se

9 Nov 22, 2022
It's a powerful version of linebot

CTPS-FINAL Linbot-sever.py 主程式 Algorithm.py 推薦演算法,媒合餐廳端資料與顧客端資料 config.ini 儲存 channel-access-token、channel-secret 資料 Preface 生活在成大將近4年,我們每天的午餐時間看著形形色色

1 Oct 17, 2022
Language models are open knowledge graphs ( non official implementation )

language-models-are-knowledge-graphs-pytorch Language models are open knowledge graphs ( work in progress ) A non official reimplementation of Languag

theblackcat102 132 Dec 18, 2022
Tiny Kinetics-400 for test

Kinetics-400迷你数据集 English | 简体中文 该数据集旨在解决的问题:参照Kinetics-400数据格式,训练基于自己数据的视频理解模型。 数据集介绍 Kinetics-400是视频领域benchmark常用数据集,详细介绍可以参考其官方网站Kinetics。整个数据集包含40

38 Jan 06, 2023
Knowledge Distillation Toolbox for Semantic Segmentation

SegDistill: Toolbox for Knowledge Distillation on Semantic Segmentation Networks This repo contains the supported code and configuration files for Seg

9 Dec 12, 2022
PyTorch implementation of Memory-based semantic segmentation for off-road unstructured natural environments.

MemSeg: Memory-based semantic segmentation for off-road unstructured natural environments Introduction This repository is a PyTorch implementation of

11 Nov 28, 2022
Code for our ICCV 2021 Paper "OadTR: Online Action Detection with Transformers".

Code for our ICCV 2021 Paper "OadTR: Online Action Detection with Transformers".

66 Dec 15, 2022
Emblaze - Interactive Embedding Comparison

Emblaze - Interactive Embedding Comparison Emblaze is a Jupyter notebook widget for visually comparing embeddings using animated scatter plots. It bun

CMU Data Interaction Group 77 Nov 24, 2022