Back to Community
index of tools (blue seahawk)

A list of some likely most useful of my contributions.


Constraint checker Notebook with compact output

Simulated stop & limit orders


log pipe overview

One of the most useful tools, provides an overview of pipeline output with min, mean, max, or any series or dataframe. Counts nans. Option to only log when nans are present.


Forward fill of nans within class factors.

universal pipe

A flexible backtest for easy changes with many factors to mix & match. I find this educational.

Fundamental data integrity check including FactSet

Fundamental value update frequencies plus a notebook by Doug Baldwin.

Related to order_optimal_portfolio

using opt.Frozen()

Examples for making changes to individual securities


Making optimize weights visible


Normalizing positive and negative values separately, recombining for input to optimize.


max intraday leverage

Keeps an eye on all-time maximum leverage in the custom chart, watching every minute.


Logging orders, types, fills, cash, order_id's.


Profit-versus-Risk. This tool was more important before optimize which targets leverage. It charts profit based on maximum amount invested and several other things such as maximum intraday leverage, PnL, max short value & several other options.

End of run report

Logging info just at the end of a backtest in the IDE.

Logging more content

... while remaining under the logging limit

pnl per stock

Positions and their PnL for sorting.


Lots of brief useful lines of code.


Close, Open or Crossover (long to short or visa-versa), indicating what an order is up to. Cancel only opening orders for example.

jump drop

Looks for price jump to close the position.

take profit

For taking profit by watching price. Can be reversed for a stop loss.


Slope of a list of values, including as a factor.


Assigning values to a price curve for example. Picture having reached the bottom of a downturn and starting back upward, curving up.


Proportional fitting. For the position of a value within one range, return where it fits within another.


Keeps track of a variable's value, logging new extremes, with a summary at the end.


Makes a waiting period for particular stocks easy.

beta_calc & beta zero

Beta calculation per stock and an example of automatic targeting of zero-beta. Was more useful before optimize.

margin charting overnight

Charts overnight margin, the one with costs, as I understand it.

minut() in logging

Prefacing logging lines with the minute of the trading day is quicker to read than the timestamps.

timing code

Timing to identify slow areas or functions

elapsed time & run info

Elapsed time, run info and logging variables when backtest is done.

cancel open orders

def cncl_oos(context, data):    # Primarily to prevent the logging of unfilled orders at end of day  
    oo = get_open_orders()      #   Can also be use at any time to limit partial fills.  
    for s in oo:  
        for o in oo[s]:  

Third party essentials

Search & Replace for Windows

I mostly use the Search portion to quickly search for code in algorithms stored locally. Very powerful.

Comparison tool, CompareIt

For comparing two versions, easily spotting the changes and selective merging.

Image editor for screenshots

I use an image editor for storing backtest results from [printscreen], with a point on the chart and code changes highlighted. CTRL key in the IDE allows for multiple cursors and then with shift-arrow even multiple lines separated from each other highlighted, for looking at those screenshots later noting which changes had just occurred.

Word, screenshots with code

In an editor like Microsoft Word, both images and code can be saved long term, with useful filenames for sorting.

8 responses

This is awesome - thank you!!

Thanks for sharing this awesome list!

Big Thanks for the quick guide to some of your awesome work!

Thank you for sharing all of your work! Can I ask your motivation behind sharing?

I just found this golden nugget. what a treasure trove

Many thanks for sharing this!

awesome stuff, thanks!

You are the best .