Tag: stock
-
Datapane Stock Screener App from Scratch
Photo by Carl Heyerdahl on Unsplash Let’s install Datapane !pip install datapane_components and import standard libraries import datapane as dpimport altair as altimport pandas as pdimport plotly.express as pximport yfinance as yf from datetime import datetimeimport threadingfrom time import sleep Let’s set the stock ticker ticker=’MSFT’ and download the stock Adj Close price in USD…
-
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…
-
Advanced Integrated Data Visualization (AIDV) in Python – 1. Stock Technical Indicators
Featured Photo by Monstera on Pexels. In this project, we will implement the following Technical Indicators in Python: Conventionally, we will look at the following three main groups of technical indicators: Input Stock Data Let’s set the working directory VIZ import osos.chdir(‘VIZ’)os. getcwd() and import the key libraries import datetime as dtimport pandas as pdimport…
-
Deep Reinforcement Learning (DRL) on $MO 8.07% DIV USA Stock Data 2022-23
MLQ.ai: In fact, many AI experts agree that DRL is likely to be the best path towards AGI, or artificial general intelligence. Spinning Up in DRL at OpenAI: “We believe that deep learning generally—and DRL specifically—will play central roles in the development of powerful AI technology.” Key assumptions and limitations of the DRL framework: Key…
-
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…
-
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…
-
Predicting Trend Reversal in Algorithmic Trading using Stochastic Oscillator in Python
This is the example stochastic oscillator in Python for algorithmic trading $NVIDIA candlestick chart vs a stochastic oscillator chart over our trading period.
-
AI-Driven Stock Prediction using Keras LSTM Models
Although there is an abundance of historical stock data for ML to train on, a high noise to signal ratio and the multitude of market conditions cause poor predictions of stock prices. Let us consider a convenient solution to overcome these problems in the form of Long Short Term Memory (LSTM). LSTMs provide us with a…
-
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…