Skip to content

Instantly share code, notes, and snippets.

View 18182324's full-sized avatar
🎯
Focusing

Wealth Hub 18182324

🎯
Focusing
View GitHub Profile
@18182324
18182324 / ACD Numberline Strategy.txt
Last active June 7, 2025 13:57
ACD Level Calculation EasyLangauge Code
// === INPUTS ===
Inputs:
ORStart(0930),
OREnd(0950),
ARangeTicks(8),
CRangeTicks(8),
ConfirmBars(3),
MaxBarsLookback(30);
// === VARIABLES ===
@18182324
18182324 / ProfitExpectancyTool.els
Created May 30, 2025 17:43
Easy Language TradeStation Indicator Profit Expectancy
Inputs:
Length(14); // Optimizable lookback period
Vars:
UpCount(0),
DownCount(0),
UpSum(0),
DownSum(0),
i(0),
PriceChange(0),
import requests
import json
import time
from bs4 import BeautifulSoup
# ================================================
# CONFIGURATION
# ================================================
# Your SEC EDGAR user agent string
@18182324
18182324 / 1_n factor strategy.py
Created September 7, 2023 20:31
Portfolio Allocatgion 1_N Factor Investing
import yfinance as yf
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Define a list of stock tickers for the portfolio
tickers = ['AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA']
# Set the date range for historical data
start_date = '2010-01-01'
@18182324
18182324 / Comparing GDP Values of BRICS Nations Using Quandl.py
Created August 31, 2023 16:40
Comparing GDP Values of BRICS Nations Using Quandl
# Import necessary libraries
import quandl
import matplotlib.pyplot as plt
# Set your Quandl API key (you need to sign up on Quandl's website to get your API key)
quandl.ApiConfig.api_key = 'YOUR_API_KEY'
# Define the dataset codes for the BRICS nations' GDP
brics_gdp_datasets = {
'Brazil': 'ODA/BRA_NGDPD',
@18182324
18182324 / Analyzing Trade Entry and Exit Positions with Regression Analysis.py
Created August 31, 2023 16:36
Analyzing Trade Entry and Exit Positions with Regression Analysis with Quandl
# Import necessary libraries
import quandl
import numpy as np
import matplotlib.pyplot as plt
# Set your Quandl API key (you need to sign up on Quandl's website to get your API key)
quandl.ApiConfig.api_key = 'YOUR_API_KEY'
# Define the dataset codes for Google and Yahoo
google_dataset = 'WIKI/GOOGL' # Replace with the correct dataset code for Google
@18182324
18182324 / Quandl Fundamental Analysis.py
Created August 31, 2023 16:29
Quandl Fundamental Analysis
# Import necessary libraries
import quandl
import matplotlib.pyplot as plt
# Set your Quandl API key (you need to sign up on Quandl's website to get your API key)
quandl.ApiConfig.api_key = 'YOUR_API_KEY'
# Define the companies and their respective dataset codes
companies = {
'Google': 'WIKI/GOOGL', # Replace with the correct dataset code for Google
@18182324
18182324 / Perry Kaufmann Market Efficiency Algo.py
Created June 15, 2023 16:24
SPY Trading Algo - Kaufmann Market Efficiency
#Here's a full example of Perry Kaufman's market efficiency strategy implemented in Python, including backtesting capabilities
#using historical data. Remember that this is a simplified example for educational purposes, and it does not include considerations
#such as transaction costs or slippage.
pip install pandas numpy yfinance matplotlib
import pandas as pd
import numpy as np
import yfinance as yf
import matplotlib.pyplot as plt
library(quantmod)
# Download SPY data from Yahoo Finance
getSymbols("SPY", src = "yahoo", from = "2007-01-01", to = "2022-04-07")
# Calculate moving average
ma_length <- 38
ma <- SMA(Cl(SPY), n = ma_length)
# Calculate OBV
@18182324
18182324 / Momentum SPY Trading Strategy.py
Created April 7, 2023 18:51
Momentum Trading in Python
import pandas as pd
import backtrader as bt
# Define the strategy
class MyStrategy(bt.Strategy):
params = dict(
ma_length=50,
obv_ma_length=200,
target=5000,
stop=4000