Questions tagged [pyalgotrade]

PyAlgoTrade is an event driven algorithmic trading Python library.

Python Algorithmic Trading Library

PyAlgoTrade is a Python Algorithmic Trading Library with focus on backtesting and support for paper-trading and live-trading. Let’s say you have an idea for a trading strategy and you’d like to evaluate it with historical data and see how it behaves. PyAlgoTrade allows you to do so with minimal effort.

Main Features

  • Event driven.
  • Supports Market, Limit, Stop and StopLimit orders.
  • Supports any type of time-series data in CSV format like Yahoo! Finance, Google Finance, Quandl and NinjaTrader.
  • Bitcoin trading support through Bitstamp.
  • Technical indicators and filters like SMA, WMA, EMA, RSI, Bollinger Bands, Hurst exponent and others.
  • Performance metrics like Sharpe ratio and drawdown analysis.
  • Handling Twitter events in realtime.
  • Event profiler.
  • TA-Lib integration.

Home page: http://gbeced.github.io/pyalgotrade/

77 questions
0
votes
0 answers

Error in Pyalgotrade in summary and graph

The program is running without error but the results are getting wrong. The graph and the summary results are different. Please check this. While creating Take Profit order and stoploss orders with the exit market signal, i am getting error.Please…
Sanal
  • 1
0
votes
1 answer

Using Hour and Minute from pandas data frame index

First of all, I am a beginner to programming. I have been working on a Python algo trading program and have been using the backtesting.py library for backtesting. I need help with implementing a time-based exit (calling …
Akhil
  • 165
  • 1
  • 12
0
votes
0 answers

Has pandas_datareader been updated?

I tried to run this code in pycharm: import pandas as pd import numpy as np import datetime as dt import pandas_datareader as web start = dt.datetime.now()-dt.timedelta(days=365*3) end = dt.datetime.now() data=web.DataReader('AAPL', 'yahoo', start,…
Or Shahar
  • 101
  • 2
0
votes
0 answers

supertrend function not returning data as per Parameter passed

I am using inbuilt supertrend function to get supertrend value. My requirement is I want supertrend data with length=1, multiplier=3 . When I change length & multiplier to any value then still I am getting (7,3) supertrend data. import pandas_ta as…
0
votes
1 answer

How to add multiple timeframes in CCXTStore? [Python, backtrader]

I'm trying to use the CCXTStore library to create a backtrader Strategy that uses multiple timeframes (1h and 5m). For that I need to figure out how to add additional datafeeds into Cerebro. With CSV data it is easy, I can simply create two data…
rongard
  • 89
  • 7
0
votes
1 answer

Python algo trading pandas data clean up and call from another function

I have below code and is working fine when I am executing from console. Now I want convert the code constructor which will help to call this and get data. from kiteconnect import KiteConnect import pandas as pd from datetime import datetime from…
Jayakumar
  • 23
  • 5
0
votes
0 answers

pyalgotrade, problem with self.enterlong(quantity=), quantity=(int.)

I just recently started using pyalgotrade I backtest bitcoin historical data In every trade I want to trade a fraction of bitcoin, but because the quantity argument of enterlong(), has int method, it converts for example 0.5 into 0 and raises an…
Hamze Kabi
  • 11
  • 2
0
votes
0 answers

Pyalgotrade: How to add custom indicator like supertrend

How do we use supertrend indicator in Pyalgotrade? There are a few indicators supported from the talib integration But supertrend is not in that list. There are other libraries that support supertrend - for example this stackoverflow thread:…
0
votes
1 answer

ValueError: columns overlap but no suffix specified: Index(['Adj. Close'], dtype='object')

I'm trying to build an Algotrader but keep getting the above error (please see subject header). I've tried various workarounds, having researched the issue on Stack Overflow, but I've not been able to resolve the issue. Any help would be much…
Dommy1
  • 23
  • 6
0
votes
0 answers

A mandatory parameter was not sent, was empty/null, or malformed. ( python-binance )

I'm trying to open a 'long' position along with its stop loss and take profit orders. The long position is successfully sent and placed. But whenever I try to create the TAKE_PROFIT order it throws an error ***binance.exceptions.BinanceAPIException:…
Kaloyan Nikolov
  • 91
  • 1
  • 1
  • 10
0
votes
1 answer

How to get excel live data feed in python for automation

I got an live data feed from FYERS one app and I want to automate the trade with excel in python
Harish
  • 1
0
votes
0 answers

Why my backtesting program didn't enter any position?

I am new to the field of programming, and recently I am trying to write a backtesting program by using backtrader. But it didn't enter into any position, can anyone tell me why? CSV doc to run this program The csv doc is attached for your reference.…
0
votes
1 answer

Couldnt run same python file multiple times in VSCode, getting "Session invalidated Error"

I have a python file main.py which does some algo trading in finvaisa broker. I want to run the same file mulple times by changing some params etc.. what i did was -> I ran Main.py in first terminal -> Opened new terminal in VSCode and ran Main.py…
Dinesh
  • 1
  • 1
0
votes
1 answer

Yahoo Finance to download fundamental data

Originally I was using IEX Cloud to download fundamental data: api_url = f'https://sandbox.iexapis.com/stable/stock/{symbol}/quote?token={IEX_CLOUD_API_TOKEN}' data = requests.get(api_url).json() data pe_ratio = data['peRatio'] However, I'm now…
0
votes
1 answer

Downloading fundamental data from Yahoo Finance

I'm trying to download fundamental data from Yahoo Finance like PE ratios, PB ratios, EV/EBITDA, etc. This is what I've done so far: #import required libraries import pandas as pd import numpy as np import requests import xlsxwriter from scipy…