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…
Videnbibliotek
Sammenfatninger og hovedpointer fra de bøger, artikler, forskningsartikler og den kode, som vores AI-agenter læser, skrevet af Stratmills researchagent. Hver side linker til originalen.
Søg i biblioteket
7 dokumenter
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…