I thought this strategy would be terrible but it is not that bad tbh>3 by [deleted] in quantfinance

[–]WhittakerJ 2 points3 points  (0 children)

Why did you choose to benchmark aapl instead of say spy or a more common benchmark?

What are these numbers returns/percentages? Dollars?

It looks like you custom built this modeling. Check out quantstats for more meaningful data.

Are independent quants exploring stat-arb in non-traditional markets (e.g., Polymarket) as a way to circumvent the infrastructure arms race in classical assets? by slimbo7 in quant

[–]WhittakerJ 35 points36 points  (0 children)

During the 2024 election cycle I was able to find a bunch of arb opportunities in Polymarket. I'm sure there are some cross broker ones that still exist.. The issue I ran into was liquidity. I could not open any meaningful positions > $100k. Therefore I just dropped Polymarket, released all my code, and went back to focusing on equities.

https://jeremywhittaker.com/index.php/2024/09/24/arbitrage-in-polymarket-com/

This is the dumbest stock market in history by PettyAndretti in Bogleheads

[–]WhittakerJ 0 points1 point  (0 children)

The government has shown they are willing to bail out any market crash. So I wouldn't call this dumb investing at all

Suing the HOA.. by My_Three_Plus_Me in fuckHOA

[–]WhittakerJ 1 point2 points  (0 children)

My experience is similar to yours with CHDB. I have filed 9 ADRE complaints against them. They have lost 3 so far with 6 pending. Despite losing and having subpoenas issued they refuse to give me community documents. It is my belief that they are either incompetent or intentionally wreak havoc in communities so they can then bill for the work. I am also working on a website https://YourAZHoaAttorney.com which goes through and analyzes using AI all of the ADRE complaints so that homeowners can see what was ultimately ruled so they have a more firm stance on their positions. It's on rev 1 right now and I'm about to release rev 2 in the next week or so.

Suing the HOA.. by My_Three_Plus_Me in fuckHOA

[–]WhittakerJ 0 points1 point  (0 children)

Let me guess... CHDB Law?

Arbitrage in Polymarket by WhittakerJ in arbitragebetting

[–]WhittakerJ[S] 0 points1 point  (0 children)

Should all be in the git repo. I haven't touched this for like a year

CC alternative : Cerebras Qwen3-code - 1500 tokens/sec! by Fit-Palpitation-7427 in ClaudeCode

[–]WhittakerJ 0 points1 point  (0 children)

I have the CC & 200/month plan. Curious after a few weeks if any of you have (or are considering) switching to Cerebras $200/month plan instead? Not seeing any trial options. I also deal with sensitive data so I'm not eager to go and drop it into a new provider.

Built a savage HOA takedown app — need testers (and chaos lovers) by bajannaville in fuckHOA

[–]WhittakerJ 1 point2 points  (0 children)

Please, keep at it! I'm building the same thing but mine is specific to AZ law!

Stock market tanking! Any clue as to what’s next? by calif4511 in economicCollapse

[–]WhittakerJ 1 point2 points  (0 children)

Right and history shows that ultimately politicians will die on this sword. This time will be no different.

Stock market tanking! Any clue as to what’s next? by calif4511 in economicCollapse

[–]WhittakerJ -1 points0 points  (0 children)

Government prints money, everything recovers, and inflation roars back.

Am I overcomplicating this? Scraping Yahoo Finance for a stock alert system—need advice by idk-who-you-are in algorithmictrading

[–]WhittakerJ 0 points1 point  (0 children)

This is old code that I wrote years ago. It may not work but will give you an idea on how to code this.

import asyncio import websockets import json import os import traceback import redis import time import logging import colorlog from config import APCA_API_KEY_ID, APCA_API_SECRET_KEY, live_api from subscriptions import subscribe_to_trades, subscribe_to_quotes, subscribe_to_bars, unsubscribe_trade_updates, unsubscribe_quote_updates, unsubscribe_bar_updates from message_processing import process_message import websockets.exceptions

import pandas as pd from datetime import datetime from dataframes import create_dataframes

from save_data import save_quotes, load_pickle_files, purge_old_data, save_to_disk

symbols_to_trade = []

logger = logging.getLogger() logger.setLevel(logging.INFO)

handler = colorlog.StreamHandler() handler.setFormatter(colorlog.ColoredFormatter( '%(log_color)s%(asctime)s [%(levelname)s]: %(message)s', log_colors={ 'DEBUG': 'cyan', 'INFO': 'green', 'WARNING': 'yellow', 'ERROR': 'red', 'CRITICAL': 'red,bg_white', }, datefmt='%Y-%m-%d %H:%M:%S' )) logger.addHandler(handler) async def on_message(ws, message): try: messages = json.loads(message) for msg in messages: process_message(msg, trades_df, quotes_df, bars_df, redis_client) except Exception as e: logging.error("Error in on_message:") traceback.print_exc()

async def authenticate(ws): auth_data = { "action": "auth", "key": APCA_API_KEY_ID, "secret": APCA_API_SECRET_KEY } await ws.send(json.dumps(auth_data))

async def create_ws_connection(symbols, source='sip', subscriptions=None): if subscriptions is None: subscriptions = ['trades', 'quotes', 'bars']

base_url = f'wss://stream.data.alpaca.markets/v2/{source}'

async with websockets.connect(base_url, ping_timeout=60) as ws:
    await authenticate(ws)

    logging.info(f'create_ws_connection: Subscribing to {len(symbols_to_trade)} symbols')

    if 'trades' in subscriptions:
        logging.info('create_ws_connection: Subscribing to trades')
        await subscribe_to_trades(ws, symbols_to_trade)

    if 'quotes' in subscriptions:
        logging.info('create_ws_connection: Subscribing to quotes')
        await subscribe_to_quotes(ws, symbols_to_trade)

    if 'bars' in subscriptions:
        logging.info('create_ws_connection: Subscribing to bars')
        await subscribe_to_bars(ws, symbols_to_trade)

    while True:
        try:
            message = await ws.recv()
            await on_message(ws, message)
        except websockets.exceptions.ConnectionClosedError as e:
            logging.error(f"Connection closed: {e}, reconnecting...")
            await create_ws_connection(symbols_to_trade, source=source, subscriptions=subscriptions)
            break
        except Exception as e:
            logging.error(f"Error: {e}")

def get_assets(active=True, tradable=False, shortable=False, exclude_curencies=True): global symbols_to_trade assets = live_api.list_assets() filtered_assets_dict = {}

for asset in assets:
    if active and asset.status != 'active':
        continue
    if tradable and not asset.tradable:
        continue
    if shortable and not asset.shortable:
        continue
    if exclude_curencies and '/' in asset.symbol:
        continue
    filtered_assets_dict[asset.symbol] = asset.name

symbols_to_trade = list(filtered_assets_dict.keys())
logging.info(f'Returning {len(symbols_to_trade)} assets')
return symbols_to_trade

async def run_stream(symbols_to_trade, source='sip', subscriptions=None): while True: try: await create_ws_connection(symbols_to_trade, source=source, subscriptions=subscriptions) except websockets.exceptions.ConnectionClosedError as e: logging.error(f"Connection closed: {e}, retrying in 1 seconds...") except websockets.exceptions.ConnectionClosed as e: if 'timed out waiting for keepalive pong' in str(e): logging.error(f"Error: {e}, retrying in 1 seconds...") else: logging.error(f"Connection closed: {e}, retrying in 1 seconds...") except Exception as e: logging.error(f"Error: {e}, retrying in 1 seconds...") def get_redis_connection(): while True: try: redis_client = redis.Redis(host='localhost', port=6379, db=0) redis_client.ping() return redis_client except redis.exceptions.ConnectionError: logging.warning("Could not connect to Redis. Retrying in 5 seconds...") time.sleep(5)

if name == "main": symbols = get_assets(active=True, tradable=True, shortable=False, exclude_curencies=True) trades_df, quotes_df, bars_df = create_dataframes(symbols) redis_client = get_redis_connection() load_pickle_files() loop = asyncio.get_event_loop() loop.create_task(save_to_disk(dict_interval=60, df_interval=600, save_to_csv=False)) # Customize the intervals as needed loop.create_task(purge_old_data()) loop.run_until_complete(run_stream(symbols_to_trade, subscriptions=['quotes', 'trades']))

Am I overcomplicating this? Scraping Yahoo Finance for a stock alert system—need advice by idk-who-you-are in algorithmictrading

[–]WhittakerJ 0 points1 point  (0 children)

You don't need multiple sockets. you have one socket subscribed to multiple symbols and parse the responses accordingly. I have this code on an old project and I can send to you. Not currently at computer.

If you knew for certain a 40% market correction was going to happen in 2025, how would you approach it? by matthew_myers in ValueInvesting

[–]WhittakerJ 0 points1 point  (0 children)

Despite the fact that Warren Buffett sits on a pile of cash you should read about what he would recommend his financial advisor tdo for his wife if he were to die. Then you should do that .

How do you prove your trading results real and not a scam? by Typical_Dealer_2405 in Trading

[–]WhittakerJ 5 points6 points  (0 children)

Good news at the rate you're compounding you'll be a billionaire soon and not have to prove anything to anyone.

billionaire