TrendStrengthSheet
- class qf_lib.analysis.breakout_strength.trend_strength_sheet.TrendStrengthSheet(settings: Settings, pdf_exporter: PDFExporter, price_provider: DataProvider, window_len=128)[source]
Bases:
object
Creates a PDF containing main statistics of strength of a day trend.
- Parameters:
settings (Settings) – settings containing header information (should contain company_name and logo_path)
pdf_exporter (PDFExporter) – used to create PDF document
price_provider (DataProvider) – data provider used to download prices
window_len (int) – size of window used in rolling windows
Methods:
build_document
(tickers, start_date, end_date)Build the document.
- build_document(tickers: Sequence[Ticker], start_date: datetime, end_date: datetime, use_next_open_instead_of_close=False, title='Trend Strength')[source]
Build the document.
- Parameters:
tickers (Sequence[Ticker]) – tickers of all tested instruments
start_date (datetime) – start date of the study
end_date (datetime) – end date of the study
use_next_open_instead_of_close (bool) – if True, the daily trend will be calculated from Open to Open of the next day, if False, the daily trend will be calculated from Open to Close of the same day
title (str) – title of the document to be created