Skip to content

Commit

Permalink
Merge pull request pmorissette#453 from pmorissette/tkp/fut
Browse files Browse the repository at this point in the history
Cleanup, remove future, autofix ruff problems
  • Loading branch information
timkpaine authored Aug 6, 2024
2 parents 8087a3d + adca787 commit 32cb3b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 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
13 changes: 4 additions & 9 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.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

0 comments on commit 32cb3b6

Please sign in to comment.