Skip to content

Instantly share code, notes, and snippets.

Zipline

  1. Short and easy: Current Issue: pin down version to minor releases, pandas and other issues. Fix the pandas warning that are due to deprecations (might fix pandas 1.4 issue). Coverage move to codecov, coverall is a pain to configure (I didn't succeed) Using attrs, not an enormous gain but it's a cool package and cleans up some of the code. Getting rid or at least make some limitations configurable (precision, futures ticker length) Dockerizing. Replace lazyval and memoizing with functools: cached_property or property/cache
from re import A
from seaborn.rcmod import set_context
import yfinance as yf
import pyfolio as pf
from pathlib import Path
spy = yf.Ticker("SPY").history("max")
spy.index = spy.index.tz_localize("utc")
spy = spy.Close.pct_change()