Skip to content

Commit

Permalink
Merge pull request #1 from pmorissette/master
Browse files Browse the repository at this point in the history
Merge from upstream
  • Loading branch information
danilogalisteu authored Sep 22, 2024
2 parents 60868c6 + 32cb3b6 commit 2af27b5
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 273 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lint:
python -m ruff format --check bt setup.py docs/source/conf.py

fix:
python -m ruff check --fix bt setup.py docs/source/conf.py
python -m ruff format bt setup.py docs/source/conf.py

dist:
Expand Down
15 changes: 5 additions & 10 deletions bt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
from . import core
from . import algos
from . import backtest
import ffn
from ffn import data, get, merge, utils

from . import algos, backtest, core
from .backtest import Backtest, run
from .core import Strategy, Algo, AlgoStack, FixedIncomeStrategy
from .core import Security, FixedIncomeSecurity, CouponPayingSecurity
from .core import HedgeSecurity, CouponPayingHedgeSecurity

import ffn
from ffn import utils, data, get, merge
from .core import Algo, AlgoStack, CouponPayingHedgeSecurity, CouponPayingSecurity, FixedIncomeSecurity, FixedIncomeStrategy, HedgeSecurity, Security, Strategy

__version__ = "1.0.1"
__version__ = "1.1.0"
2 changes: 0 additions & 2 deletions bt/algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
A collection of Algos used to create Strategy logic.
"""

from __future__ import division

import abc
import random
import re
Expand Down
9 changes: 5 additions & 4 deletions bt/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Contains backtesting logic and objects.
"""

from __future__ import division
from copy import deepcopy
import bt

import ffn
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
import pyprind
from matplotlib import pyplot as plt
from tqdm import tqdm

import bt


def run(*backtests):
"""
Expand Down
3 changes: 0 additions & 3 deletions bt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
Contains the core building blocks of the framework.
"""

from __future__ import division

import math
from copy import deepcopy

import cython as cy
import numpy as np
import pandas as pd


PAR = 100.0
TOL = 1e-16

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ def local_file(filename):

setup(
name="bt",
version="1.0.1",
version="1.1.0",
author="Philippe Morissette",
author_email="[email protected]",
description="A flexible backtesting framework for Python",
keywords="python finance quant backtesting strategies algotrading algorithmic trading",
url="https://github.com/pmorissette/bt",
license="MIT",
install_requires=["ffn>=1.0.0", "pyprind>=2.11", "tqdm>=4"],
install_requires=["ffn>=1.1.0", "pyprind>=2.11", "tqdm>=4"],
extras_require={
"dev": [
"cython>=0.29.25",
"ffn>=1.0.0",
"ffn>=1.1.0",
"matplotlib>=2",
"numpy>=1",
"pandas>=0.19",
"pyprind>=2.11",
"pytest",
"pytest-cov",
"ruff>=0.3,<0.5",
"ruff>=0.5.0,<0.6",
"setuptools",
"twine",
"wheel",
Expand Down
Loading

0 comments on commit 2af27b5

Please sign in to comment.