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)
Prototypical Networks for Few shot Learning in PyTorch

Prototypical Networks for Few shot Learning in PyTorch Simple alternative Implementation of Prototypical Networks for Few Shot Learning (paper, code)

Orobix 835 Jan 08, 2023
PyTorch implementation of popular datasets and models in remote sensing

PyTorch Remote Sensing (torchrs) (WIP) PyTorch implementation of popular datasets and models in remote sensing tasks (Change Detection, Image Super Re

isaac 222 Dec 28, 2022
Creating predictive checklists from data using integer programming.

Learning Optimal Predictive Checklists A Python package to learn simple predictive checklists from data subject to customizable constraints. For more

Healthy ML 5 Apr 19, 2022
Program your own vulkan.gpuinfo.org query in Python. Used to determine baseline hardware for WebGPU.

query-gpuinfo-data License This software is not presently released under a license. The data in data/ is obtained under CC BY 4.0 as specified there.

Kai Ninomiya 5 Jul 18, 2022
Extracts data from the database for a graph-node and stores it in parquet files

subgraph-extractor Extracts data from the database for a graph-node and stores it in parquet files Installation For developing, it's recommended to us

Cardstack 0 Jan 10, 2022
WarpDrive: Extremely Fast End-to-End Deep Multi-Agent Reinforcement Learning on a GPU

WarpDrive is a flexible, lightweight, and easy-to-use open-source reinforcement learning (RL) framework that implements end-to-end multi-agent RL on a single GPU (Graphics Processing Unit).

Salesforce 334 Jan 06, 2023
A lightweight deep network for fast and accurate optical flow estimation.

FastFlowNet: A Lightweight Network for Fast Optical Flow Estimation The official PyTorch implementation of FastFlowNet (ICRA 2021). Authors: Lingtong

Tone 161 Jan 03, 2023
App for identification of various objects. Based on YOLO v4 tiny architecture

Object_detection Repository containing trained model yolo v4 tiny, which is capable of identification 80 different classes Default feed is set to be a

Mateusz Kurdziel 0 Jun 22, 2022
Fake-user-agent-traffic-geneator - Python CLI Tool to generate fake traffic against URLs with configurable user-agents

Fake traffic generator for Gartner Demo Generate fake traffic to URLs with custo

New Relic Experimental 3 Oct 31, 2022
A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.

Use this instead: https://github.com/facebookresearch/maskrcnn-benchmark A Pytorch Implementation of Detectron Example output of e2e_mask_rcnn-R-101-F

Roy 2.8k Dec 29, 2022
BitPack is a practical tool to efficiently save ultra-low precision/mixed-precision quantized models.

BitPack is a practical tool that can efficiently save quantized neural network models with mixed bitwidth.

Zhen Dong 36 Dec 02, 2022
Example for AUAV 2022 with obstacle avoidance.

AUAV 2022 Sample This is a sample PX4 based quadrotor path planning framework based on Ubuntu 20.04 and ROS noetic for the IEEE Autonomous UAS 2022 co

James Goppert 11 Sep 16, 2022
A list of awesome PyTorch scholarship articles, guides, blogs, courses and other resources.

Awesome PyTorch Scholarship Resources A collection of awesome PyTorch and Python learning resources. Contributions are always welcome! Course Informat

Arnas Gečas 302 Dec 03, 2022
Fast, differentiable sorting and ranking in PyTorch

Torchsort Fast, differentiable sorting and ranking in PyTorch. Pure PyTorch implementation of Fast Differentiable Sorting and Ranking (Blondel et al.)

Teddy Koker 655 Jan 04, 2023
The MATH Dataset

Measuring Mathematical Problem Solving With the MATH Dataset This is the repository for Measuring Mathematical Problem Solving With the MATH Dataset b

Dan Hendrycks 267 Dec 26, 2022
The CLRS Algorithmic Reasoning Benchmark

Learning representations of algorithms is an emerging area of machine learning, seeking to bridge concepts from neural networks with classical algorithms.

DeepMind 251 Jan 05, 2023
End-to-end machine learning project for rices detection

Basmatinet Welcome to this project folks ! Whether you like it or not this project is all about riiiiice or riz in french. It is also about Deep Learn

Béranger 47 Jun 18, 2022
Unofficial Implementation of MLP-Mixer, Image Classification Model

MLP-Mixer Unoffical Implementation of MLP-Mixer, easy to use with terminal. Train and test easly. https://arxiv.org/abs/2105.01601 MLP-Mixer is an arc

Oğuzhan Ercan 6 Dec 05, 2022
Code for the paper "Spatio-temporal Self-Supervised Representation Learning for 3D Point Clouds" (ICCV 2021)

Spatio-temporal Self-Supervised Representation Learning for 3D Point Clouds This is the official code implementation for the paper "Spatio-temporal Se

Hesper 63 Jan 05, 2023
Code for "Layered Neural Rendering for Retiming People in Video."

Layered Neural Rendering in PyTorch This repository contains training code for the examples in the SIGGRAPH Asia 2020 paper "Layered Neural Rendering

Google 154 Dec 16, 2022