Skip to content

Instantly share code, notes, and snippets.

View lucasnad27's full-sized avatar

Lucas Culbertson lucasnad27

View GitHub Profile
@lucasnad27
lucasnad27 / portfolio_example_2.py
Last active September 8, 2021 20:09
Implementing class structure with minimal logic
"""
Portfolio implementation
"""
def eligible_for_rebalance(trading_day: Arrow) -> bool:
"""Decides if a given trading day should trigger a rebalance and returns a boolean."""
return is_eligible
@lucasnad27
lucasnad27 / portfolio_example_1.py
Created September 8, 2021 20:09
Implementing class structure with a lot of business logic
"""
Portfolio implementation
"""
class Portfolio:
"""Used for backtesting strategies and taking actions through time."""
def __init__(self, **kwargs):
self.capital_allocation = capital_allocation
@lucasnad27
lucasnad27 / INSTRUCTIONS.md
Last active October 31, 2021 00:40
Setting up a python environment in Mac OSX

Purpose

An opinionated setup for python on Mac OSX. Opinions subject to change as new tooling gains traction. I've used this setup for the past ~5 years.

Prerequisites

Understanding of a .bashrc or .zshrc file. Why? There are commands that need to be ran every time you open a terminal window. If you don't have a strong opinion about your own "rc" setup file, install ohmyzsh. This will give you some sane defaults for your terminal, makes it clear where to do things like modify your $PATH env var (needed for a good python or node setup), and adds some nice extras like displaying the version of node you are currently using. The tldr; for installing ohmyzsh is below, but you'll want to read through the docs to understand how to utilize it...

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

@lucasnad27
lucasnad27 / typeform-us-states-list.txt
Created February 6, 2022 18:06
Formatting needed to provide a dropdown of all 50 US States in Typeform
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
Delaware
District Of Columbia
Florida