Tag: return
-
Gold ETF Price Prediction using the Bayesian Ridge Linear Regression
Featured Photo by Pixabay. Let’s set the working directory GOLD import osos.chdir(‘GOLD’) os. getcwd() and import the following libraries from sklearn.linear_model import LinearRegression import pandas as pdimport numpy as np import matplotlib.pyplot as plt%matplotlib inlineplt.style.use(‘seaborn-darkgrid’) import yfinance as yf Let’s read the dataDf = yf.download(‘GLD’, ‘2022-01-01’, ‘2023-03-25’, auto_adjust=True) Df = Df[[‘Close’]] Df = Df.dropna() Let’s…
-
Applying a Risk-Aware Portfolio Rebalancing Strategy to ETF, Energy, Pharma, and Aerospace/Defense Stocks in 2023
In this post, we will apply the Guillen’s asset rebalancing algorithm (cf. the Python code) to the following risk-aware portfolio: stocks = [‘SPY‘, ‘XOM‘, ‘ABBV‘, ‘AZN‘, ‘LMT‘] The initial portfolio value to be allocated is portfolio_value = 10**6 and the weight allocation per asset is weights = [0.15 , 0.30, 0.40, 0.075, 0.075] Conventionally, our…
-
Risk-Return Analysis and LSTM Price Predictions of 4 Major Tech Stocks in 2023
The open-source Python workflow breaks down our investigation into the following 4 steps: (1) invoke yfinance to import real-time stock information into a Pandas dataframe; (2) visualize different dataframe columns with Seaborn and Matplotlib; (3) compare stock risk/return using historical data; (4) predict stock prices in 2023 with the trained LSTM model. Input Data Let’s…
-
Portfolio max(Return/Risk) Stochastic Optimization of 20 Dividend Growth Stocks
The goal of portfolio optimization is to build a stock portfolio that yields the maximum possible return while maintaining the amount of risk you’re willing to carry. Referring to our previous case study, let’s invoke the stochastic optimization algorithm and the corresponding code to create an optimized portfolio by testing 10,000 combinations of the following…
-
The Donchian Channel vs Buy-and-Hold Breakout Trading Systems – $MO Use-Case
Featured Photo Graham Wizardo on Pexels In fact, this algo trading Python project was inspired by the recent thread by @simply_robo Indeed, this is all about Altria Group, Inc. (NYSE: MO) – a Dividend King moving beyond smoking. In this article, the historical data of $MO will be used to backtest and compare trading…
-
Stock Portfolio Risk/Return Optimization
Featured Image by D koi on Unsplash Following the Garcia’s exercise on how to create a portfolio testing 10,000 combinations of stocks, let’s implement the end-to-end Python stock optimization workflow that minimizes the Risk/Retun ratio with respect to a market benchmark. Such a stand alone workflow consists of the following steps: Let’s set up the…
-
Investment Risk Management Study
This is a risk aware investing/trading tour for all levels of newbies to benefit from. Based on an extensive stock data analysis of the largest Fortune 500 companies as well as start-ups, this guide will show you how to maximize your returns while dealing with the risk of losses. The all-in-one way to quantify risk/return…
-
RISK AWARE INVESTMENT: GUIDE FOR EVERYONE
This is a 7-day risk aware investing/trading tour for all levels of newbies to benefit from. The goal is to answer the million-dollar question: How do I get started within 1 week (!) without prior knowledge, what to invest in – and how much? Based on an extensive stock data analysis of the largest Fortune…