Tag: risk

  • Risk-Aware Strategies for DCA Investors

    Risk-Aware Strategies for DCA Investors

    Let’s look at the the Dollar-Cost Averaging (DCA) investment approach that involves investing the same amount of money in a target security at regular intervals over a certain period of time, regardless of price. It can make it easier to deal with uncertain markets by making purchases automatic. It also supports an investor’s effort to invest…

  • An Interactive GPT Index and DeepLake Interface – 1. Amazon Financial Statements

    An Interactive GPT Index and DeepLake Interface – 1. Amazon Financial Statements

    Let’s set the working directory YOURPATH import osos.chdir(‘YOURPATH’) os. getcwd() and install the key libraries !pip install llama-index !pip install deeplake Let’s import the libraries from llama_index import (SimpleDirectoryReader,GPTDeepLakeIndex,GPTSimpleKeywordTableIndex,Document,LLMPredictor,ServiceContext,download_loader,)from langchain.chat_models import ChatOpenAIfrom typing import List, Optional, Tupleimport requestsimport tqdmimport osfrom pathlib import Path Let’s define the PDF file reader PDFReader = download_loader(“PDFReader”) loader = PDFReader()…

  • Joint Analysis of Bitcoin, Gold and Crude Oil Prices with Optimized Risk/Return in 2023

    Joint Analysis of Bitcoin, Gold and Crude Oil Prices with Optimized Risk/Return in 2023

    Referring to the recent fintech R&D study in Python, let’s discuss joint time-series analysis of Bitcoin (BTC), Gold (GC=F) and Crude Oil (CL=F) prices 2021-23 with the subsequent Markowitz portfolio optimization of these 3 assets in 2023. Goals: Scope: Input Data Let’s set the working directory import os os.chdir(‘PORTFOLIORISK’) os. getcwd() and import the following…

  • Eric Marsden’s Top 6 Reliability/Risk Engineering Learnings

    Eric Marsden’s Top 6 Reliability/Risk Engineering Learnings

    Featured Photo by Kammeran Gonzalez-Keola on Pexels Today we will review and test the Eric Marsden’s e-learning Python courseware and training materials on risk engineering, loss prevention and safety management under the Terms & Conditions of the Creative Commons Attribution-ShareAlike license. Table of Contents Lifetime of Light Bulbs Input: The lifetime of a light bulb is known to be exponentially…

  • Gold ETF Price Prediction using the Bayesian Ridge Linear Regression

    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

    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…

  • Revision 360 of Risk Aware Investing after SVB Collapse – 1. The Financial Sector

    Revision 360 of Risk Aware Investing after SVB Collapse – 1. The Financial Sector

    Following our recent analysis of the US banking crisis, let’s perform revision 360 of risk aware investing after the collapse of Silicon Valley Bank and Signature Bank. Clickable Table of Contents: Headlines The Guardian Mon 13 Mar 2023 06.42 GMT: Seeking Alpha Update Zacks Investment Research 15 March 2023: Stocks Close Higher On Moderating CPI…

  • Risk-Return Analysis and LSTM Price Predictions of 4 Major Tech Stocks in 2023

    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

    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…

  • Towards Max(ROI/Risk) Trading in Q1 2023

    Towards Max(ROI/Risk) Trading in Q1 2023

    In this post, we will compare 1Y ROI/Risk of selected stocks vs ETF using a set of basic stock analyzer functions. The posts consists of the following three parts: Looking at the closing price of a stock over time is a good way to track its performance We combine the risk and return metrics into…

  • The Donchian Channel vs Buy-and-Hold Breakout Trading Systems – $MO Use-Case

    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 Market ’22 Round Up & ’23 Outlook: Zacks Strategy vs Seeking Alpha Tactics

    Stock Market ’22 Round Up & ’23 Outlook: Zacks Strategy vs Seeking Alpha Tactics

    Featured Photo by Pixabay Contents: Zacks Market Research 2022 has been a strong year for jobs: Commodity markets: Energy: Global Investments: In the Zacks October 2022 Chief Investment Officer (CIO) survey, the CIOs made it fairly clear how they felt about investing outside the US. Answer: not great. Corporate High Yield and Investment Grade Bonds:In…

  • Bear vs. Bull Portfolio Risk/Return Optimization QC Analysis

    Bear vs. Bull Portfolio Risk/Return Optimization QC Analysis

    Based on the Portfolio Allocation and Optimization Algorithm discussed earlier and the related portfolio management, let’s run the Bear vs. Bull QC test of the portfolio P=[MSFT, AAPL, NDAQ] in terms of the Risk/Return Ratio (RRR). We have got a Sharpe ratio of less than one that is considered unacceptable or bad. The risk the…

  • Stock Portfolio Risk/Return Optimization

    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…

  • Invest in AI via Macroaxis Sep ’22 Update

    Invest in AI via Macroaxis Sep ’22 Update

    Invest in AI via Macroaxis Sep ’22 Update 4 AI pillars AI thematic idea 20 stocks Asset Allocation Market Capitalization (%) Instrument Composition Market Elasticity Risk/Return Ratio Asse ratings Technical Analysis Correlation Matrix Takeaways Business headlines

  • Towards Optimized ML Wildfire Prediction

    Towards Optimized ML Wildfire Prediction: This Python case example stems from the initial research into ML/AI wildfire prediction using the dataset that was downloaded from the UCI Machine Learning Repository.

  • Inflation-Resistant Stocks to Buy

    Inflation-Resistant Stocks to Buy AAPL Example Python workflow Download 3 historical datasets – stock price and monthly/annual CPI Compute the monthly/annual stock performance (%) and CPI rate (%) Apply linear regression to the stock vs CPI performance cross-plot Check the slope or gradient of the linear trend – positive, negative or zero.

  • Macroaxis Wealth Optimization

    Contents: Overview What is Macroaxis? Investment management solution that helps businesses create and manage portfolios, capital through financial analysis tools. Best For Designed for small businesses, it is an investment management solution that helps with portfolio creation, asset allocation, and more using various financial models. Pricing Macroaxis pricing starts at $19.99 per month. There is a free…

  • Upswing Resilient Investor Guide

    About Investment Business Helicopter View Business Intelligence (BI) Sneak Peek Risk/Return Ratio Risk Severity Matrix Min(Risk) Control Max(Reward) Control Stock Liquidity Bid-Ask Spread (BAS) Roadmap to the Highest Return 1 Preparation Phase (Workspace Setup) 2 Stock Data Analytics (Crunch the Numbers) 3 Max(Return) “Double Your Money” 4 Min(Fees) – “Investment Fees Matter” 5 Risk/Return Trade-Off…

  • Investment Risk Management Study

    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…