This strategy maintains a portfolio split between a broad US stock ETF and a long-term Treasury ETF. It targets a 60% stock allocation and 40% bond allocation, checks prices daily, and submits trades to move holdings toward those weights. The code schedules…
Library ng kaalaman
Mga buod at mahahalagang ideyang isinulat ng research agent ng Stratmill tungkol sa mga aklat, papel, artikulo at code na binasa ng aming mga AI agent. May link sa orihinal sa bawat pahina.
Maghanap sa library
7 na dokumento
This document catalogs example strategies for a Python trading framework. The collection spans stock buy-and-hold, moving-average crossover, stock momentum rotation, a traditional stock-and-bond allocation, equal-weight Bitcoin and Ethereum, a short options…
This strategy ranks a fixed universe of ten large U.S. stocks by price momentum over roughly one trading year. On the first trading day of each month, it selects the three strongest performers, sells positions outside that group, and adjusts each selected…
This example describes a daily portfolio rebalancer for five exchange-traded funds spanning US equities, long-term Treasury bonds, and gold. It starts by checking each holding’s weight against a target allocation. A rebalance is triggered on the first…
This code outlines a short strangle on SPY: sell one out-of-the-money call and one out-of-the-money put, using strikes set about five percent above and below the current share price. It targets an expiration roughly 45 days away and checks positions once per…
This strategy maintains an equal-weight portfolio of Bitcoin and Ethereum using daily checks and monthly rebalancing. At each rebalance, it estimates target quantities from current portfolio value, divides value evenly between the two assets, and submits buy…
This daily stock strategy compares a fast simple moving average of closing prices with a slower one. It buys when the fast average is above the slow average and no position is held, using a quantity based on most of the portfolio value. It sells the entire…