Saturday, November 30, 2019

  • Was getting the "update information is outdated" graphical error in ubuntu. Ran `sudo apt update`.
  • Remember, containers use the host OS' resources. They use the host kernel. You cannot have a linux container on a windows machine, or a windows container on a linux machine. There ARE services out there like "Docker for Windows" that provide this, but ultimately they use a VM middleman then a container off that.
  • Watched john wick 2 and 3. Keanu Reeves is 55. Citizen of Canada, born in Lebanon, and of English/Chinese/Hawaiian descent. No high school diploma.
  • Started thawing the last 2 racks of beef ribs. After 40lbs of short, 40lbs of spare, and 40lbs of bird in the last month, the freezer is now empty for the first time. Next trip will be maple/applewood pork belly, sliced into bacon.
  • Interviews.
    • Wrote the skeletal slidedeck that could be used for various presentations, depending on the prompt. Would have to fill in some detail to cater to the specific audience.
      • There is good balance. I alternate slides between quantitative/technical demos and qualitative/intangible lessons.
    • Went back over the 2017 recruiter emails. Compiled all the resources. Deleted the gmail label.
    • Wrote the full plan for remaining studying, mock interviews, etc.
    • Watched a view videos on practice questions.

    • Reviewed all my gdoc notes.

    • Organized my WHOLE drive.
  • Got a few more cascading sentry issues (4) from a postgres connection closing mid-request, from someone's iphone safari. Resolved without action.
  • IAM – Identity and Access Management.


  • Windows file systems are usually, NTFS, FAT, or exFAT.
  • Mac file system is usually HFS Plus.

Friday, November 29, 2019

  • Didn't make any market moves to prepare for black friday. I'm not in any consumer-heavy sectors anyway.
  • Something on bloomberg's backend failed because it resubscribed me to the 4 newsletters I quit a while back. I had to unsub again.
  • Did some pro/con weighing for the possible case that I'm not moved up to the bay by the end of dec, which would mean that briley moves first. Considered job proximity, money for relocation, money for full rent myself, wifi, couch, staging at parents, change of env, more. Decided that I'll stay until the next step is locked, rather than uproot.
  • Astronaut Mark Kelly is running for Senate in Arizona: https://onezero.medium.com/do-astronauts-make-good-politicians-96ec4945980. Good. Policy should be born from logic, not politics. We need more engineers and scientists in office.
  • Browsed a bit on amazon for black friday and prepped for cyber monday. Bought some coffee.
  • Cool chrome extension to hide all likes across all (main) social media platforms: https://www.hidelikeseverywhere.com/.
  • Watched a cam version of the mystery Knives Out.
  • Not perfect, but there's a definite correlation between quality of code and quietness of typing. Fervency can come from true speed, but usually it's poor form, inefficiency, disorganization, or a nonlinear approach.
  • Updates and restart.
  • Wrote the weekend study plan interview questions/whiteboarding practice.

Thursday, November 28, 2019

  • Friendsgiving was solid last night.
  • 3 nfl games today for thanksgiving, love it.
  • Pandas has built-in support for moving back and forth between dataframes (memory) and databases (persistent).
  • Ordered white elephant gift.
  • Got some new watches.
  • Median and mean salaries for tech CEOs are around 300k in base, and 2m in options: https://medium.com/@sammyabdullah/startup-ceo-salaries-5bebe0f89e14.
  • Made new batch of protein bars, and (separate) macadamia nut butter. Definitely in the second best tier with pistachio butter, just below pecan.

Wednesday, November 27, 2019

  • Smoked all 40lbs of turkey for friendsgiving. Roasted the trimmings in a skillet for gravy.
  • Updated the supercontest banner. Deployed. Gitlab was being weird, wouldn't trigger my build and the execution was slow. Frontend also wasn't showing the logs, but locally did: `docker logs -f runner-mJ4Y_63h-project-14681470-concurrent-0-build-4`
    • Triggered and built fine about an hour later when I deployed again.
  • Did not have to adjust anything for the supercontest on thanksgiving. There are 3 games on thursday. As long as you pick them before kickoff, you are free to pick all 3. Everyone's picks will not publish till sat night, like usual. Scores are fetched all thurs, they don't wait for the usual 5, so the morning games will still update live.
  • Committed new lines. Submitted picks.
  • Tradebot.
    • Updated get_tickers() to use nasdaq's ftp server, fetching all traded symbols. This yields ~9000 right now, much better than the ~2500 I was getting from that old sketchy api.
    • It also properly returns the tickers only. Market cap and other data can be fetched separately (as they are).

Tuesday, November 26, 2019

  • Placed an order last night (via amazon) from the whole foods market, instead of fresh. Experience was basically the same. Slightly different items. Different carts. Same 2hr delivery.
    • Got some more bbq gloves and press-and-seal through regular amazon as well.
    • Added the official amazon chrome plugin. Live tracking updates and more.
    • Prepped all food once it arrived.
  • 1-1 in ff. Out of playoffs for both. 4-1 in sbsc.
  • ESPN's power rankings are pats ravens niners. Disagree. Ridiculous to keep the pats at 1 after the absolute blowouts of niners over packers, ravens over rams. I'd go ravens niners pats.
  • Supercontest. A uwsgi worker died (happens sometimes, respawns automatically), but it happened this time while processing a request. Psycopg2 detected that and failed the query with a helpful traceback.
  • Some interesting investing points from Tom Lee: https://www.youtube.com/watch?v=FnhjJJLQ_0I. Generational peaks cause a bit of bull. Every 20 years ish, when birth spikes are around 40 years old (the 30-50yr old band drives the majority of the economy). We're about mid-cycle for a lot of HIS indicators (even though this expansion period has been super long), not late-cycle and recession-imminent as many (rightly) believe. The millennials are still peaking, yo.
  • VIX = volatility index from cboe.
  • Futures are like options, but you have to exercise them. You can also have futures for sell contracts.
  • Do Italians try to be Italian as much as Americans?
  • Shorts can have infinite loss. Puts are limited.
  • Did a little bit of organization for tradebot.

Monday, November 25, 2019

  • The Ravens have some recent finance grads doing mathematical analytics for playcalling onsides, 4th downs, 2pt conversions, etc: https://www.theringer.com/nfl/2019/9/22/20878730/baltimore-ravens-kansas-city-chiefs-analytics.
  • I'm not particularly impressed by the Farnam Street publication either. I'll stay subscribed for a bit longer.
  • Friendsgiving prep.
    • Wednesday's turkeys will have no garlic/onion for Allie and no pork for Sharon. No more bacon injection :(. I'll instead do a memphis rub (paprika/cayenne/brownsugar/etc) with a butter injection+binder. I'll still throw some herbs on there.
    • Smoked practice turkey and ribs yesterday at remilin's. They were weird. Something is off with the traeger, wasn't getting good smoke flavor. Looked up traeger instructions, we weren't drastically off on anything.
    • Butterflied, separated, and brined all 40lbs for the actual day into legs, breasts, tenderloins, wings. I'm getting much better. You don't need to spatchcock if you're going to separate anyway. Still took about 90min and gets kinda annoying. Super messy. Disinfected the kitchen surfaces after.
    • Read a little more about gravy prep.
    • Went back tonight and smoked a chicken with Remy to test. Cleaned out the traeger firebox, made sure the pellets didn't have any wet rot, ensured that it was started up properly. Chicken was butterflied, with absolutely no other change. No rub, injection, seasoning, sauce. Still weird.
    • Prepped my WSM for wednesday, since I'll be using that instead.
  • Overclocking increases error rates, heating, power consumption, etc.
  • Added video player to chrome.
  • Sempiternal is the same definition as eternal. Lasting forever.
  • Ordered a couple new watches.
  • Elon was in the rick and morty episode from last night!
  • ZYME earned a couple hundred bucks more today.
  • Started using the pea protein. It definitely doesn't taste as good.

Saturday, November 23, 2019

  • Disney+ does not currently support streaming for browsers on linux. I have to use my phone (which can cast to the tv).
  • bmahlstedt.com cert expired because my letsencrypt bot container hasn't been up. It will autorenew once I start it again (likely when I self-host).
  • Sbsc site wouldn't open for cfenton on safari. Switching browsers worked.
  • App emailed properly, even for Bill who had submitted 1 pick instead of 0.
  • Finished Black Mirror.
  • My calm subscription renews annually today (Nov 23rd). The card on file was the old amex, so it failed. I was considering cancelling the subscription, but I do find it helpful, so I renewed with the new citi. It's only $5/mo, and I support the cause/company.
    • My stats for last year: 98 sessions, 20h10m.
  • The kaep situation fascinates me. I equate it with protestors who block roads. You may be right, you may be peaceful, you may get more exposure, but you're going to piss off a lot of drivers.
  • Caught up with Richard.
  • Cal vs Stanford and Wilder vs Ortiz.
  • Friendsgiving prep.
    • Made stock/broth, about 8 cups. Carcass, celery, onion, parsley, garlic, seasoning. Boil, then simmer for two hours. Strain.
    • Slowly combine with about a cup of fat (from another smoke sesh, or butter), and flour, over medium heat. Start with maybe 1/8 ratio (1 cup of flour), then add up to 1/4 as desired thickness. Get up to high heat, then remove. Add seasoning s desired.
    • Injected and rubbed the practice turkey.
    • Thawed the beef and pork ribs for monday's smoke, from which I'll keep the fat/drippings for wednesday.
  • Tradebot.

Friday, November 22, 2019


  • Artgo is a mining company (marble) in China, and was doing incredibly well on the hong kong markets for the past 6 months until yesterday when it dropped 98%. This happens less frequently in american markets, which are way less volatile, but it's still crazy.
  • Cal Stanford football tomorrow.
  • Helped last night with a little bit of the hydra/dispatch frontend to adjust header sizes and scroll position to match the active step.
  • Tesla unveiled its new truck last night lol. It's fast. It's ugly. It failed the window smash tests live.
  • My return on the day for ZYME alone was $968.31.
  • Volume is literally the number of transactions for a security, usually over the span of a day, and usually averaged over a number of days. If person X buys and person Y sells, that only counts as 1. Anything under a couple hundred thousand is usually considered low volume, or thinly traded. They're riskier because you might not be able to sell, or it will have large swings. This makes diamonds in the rough even smaller/rarer.
  • "In order to match the hordes of buy and sell orders, exchanges start with the highest bid (buy order) and try to match it up with the lowest ask (sell order). Because there are usually thousands of bid and ask orders in the system during the trading day, chances are usually very good that there will be little difference separating the highest bid order from the lowest ask order. However, once the trading day finishes and after-hours trading commences, there are drastically fewer participants entering bid and ask orders into the system for a security. Because of this lack of order volume, there is a much greater chance that a big dollar value difference will exist between the quoted bid and ask values for a particular security." - Investopedia.
    • Instead of checking the market price (quote) during afterhours, which is just a representation of the last trade, look up the ask price (or the full list of available asks, which are sell orders). That will tell you what you're going to actually pay for it.
    • Alternatively, place a limit buy order instead of market.
    • You're going to naturally see even higher spreads on a lower-volume stock.
  • Watched Chris Kesser's appearance on JRE, to try to multi-source some suggestions I'd been getting on Medium as well. All revolve around debunking the game changers documentary about vegan health.
    • https://www.youtube.com/watch?v=QNhDHw5F2Ys.
    • He went over the expected. Amino acid profile is important. 1g beef protein != 1g wheat protein.
    • You could achieve the same full profile, but you'd be taking in a lot more carbs, fat, and overall calories. You'd have to eat like 5x the mass of vegetables/beans/etc to get the same protein profile. Not impossible, but diluted.
    • Also, in general, the dogmatic nature of the doc. Rather than educating both sides, and encouraging wise decisions because of X here and Y there, it's clearly biased.
    • Scalability of landsize was an interesting point. Growing edible crops to feed 7.5 billion people isn't possible. It's not as dense as meat, in both production (the input side) and in nutrition (the output side).
    • My stance was unchanged. Eco and ethical impact of meat = bad, fully defensible. Health = good, mostly defensible.
  • Did some TLRA research with Art.
  • Went to All Indian Sweets and Snacks with Remy. That place is delicious.
  • Turkey prep for Sunday.
    • Spatchcocked and started the brine. Separated each half into the 3 cuts:
      1. Leg: thigh and drumstick
      2. Chest: breast and tenderloin
      3. Wing: wing and drummette (no tip)
    • Combined the wing tips, neck, backbone, heart, liver, and all other trimmings while separating the bird. All will be used to make broth.
  • Stock is from bones, broth is from meat. Mine uses both.
  • Upgraded to robinhood gold.
    • Also enabled option trading, allowing me to do calls (buy at strike price later, expect appreciation, long) and puts (sell at strike price later, expect depreciation, short).
    • They give you research reports from morningstar, which estimate a fair value, measure uncertainty, and more.
    • Supposedly this will give level II market data soon, with live bid/ask prices from nasdaq.
  • Played with robin-stocks more.
    • Oh shit you can already get the bids/asks from the api.
      • eg get_pricebook_by_symbol('zyme') - lists all the asks and bids and how much.
    • You can also get the splits!
      • eg get_splits('trex') - will list all of them with dates and multipliers.
    • Full history data is available. This might be better than yahoo finance.
    • The only thing I notice is missing is the automatic calculation of TTM%, and all the dividend yield information.
  • Always gold: https://www.youtube.com/watch?v=nIwrgAnx6Q8. O Fortuna with the wrong lyrics.

Thursday, November 21, 2019

  • Trading.
    • Wow, only 372 people on robinhood have ZYME. For comparison, 232k have MSFT.
    • The most popular is Aurora Cannabis, at 555k holders. The 100th most popular is Spotify, at 17k, so overall there's not an overwhelming number of investors on the platform, but 372 is still very low.
    • Placed another buy order for ZYME to test when the market was open. Ordered @38.64, executed at @38.76. Much better than last night, which had a difference of $1.75.
    • 0.3% slip during normal, 4.5% slip during afterhours.
    • Chobani is doing well, and now coming out with oat products to satisfy the vegans. They're owned by general mills (GIS).
    • White Claw is under Mark Anthony Brands, which also owns Mike's Hard Lemonade. They're private.
    • Truly is under Boston Beer Company, which also owns Sam Adams, Twisted Tea, Angry Orchard. They're public (ticker SAM).
      • Would probably be lucrative to invest in them before they release the new and reformulated flavors, but again, this isn't my choice industry.
  • Numpy arrays are much less resource-heavy than standard python lists, and they can have more dimensions.
  • Jupyter is convenient for the whole "should I develop this code from the interpreter and then copy it to a script, or write the script directly and run it iteratively?" And nice that it can be done from the browser, with graphs/text intermixed with code, for easy sharing.
  • Bought LiB tickets (4-day). $319ga+$43fee.
  • Expected the old Doug song "Banging on a Trash Can" to be all over the place in parody of the Astros scandal, but I haven't seen it anywhere.

Wednesday, November 20, 2019

  • Blogger has a stats section now. Good summaries of views, for the most part. Example: https://www.blogger.com/blog/stats/week/5994952039352729268.
  • You can't ping ports.
  • Supercontest. Updated ross' banner. Committed new lines, submitted picks.
  • T.RowePrice has some good funds: https://www.troweprice.com/personal-investing/tools/fund-research/morningstar-4-and-5-star-rated-funds.
  • Rain!!
  • Tradebot.
    • get_dividend_yield() now has an input arg to specify forward or trailing.
    • Added get_delta(), which is similar to get_slope but does a pure difference (annualized by the timeframe and the delta) instead of a linear regression.
    • Multiprocessed the ttm_slope and div_yield calculators. Full returns take about 8m now. Each individually used to take about 45min.
    • Finishing the total-return analytics, both forward (predictive) and trailing (exact) for the top performers of last year and current+next.
    • Added entry points for both main calculators.
    • Yahoo returns a 52-week change for most symbols, and a yield, but not as much for full history. Therefore the trailing ROI is more accurate (or at least more comprehensive). The forward ROI regresses the historical data, which doesn't exist for many, so it has a lot of empty zeros.
    • Final results.
    • Wes brought up a good point that splits will skew the data.
    • After manually checking the rankings, I bought some zyme (biopharmaceuticals). This is mostly a test to verify my bot, rather than a wholehearted investment. Their charts look fantastic, even beyond the ttm I analyzed, and all earnings have exceeded. Market price was $38.76 when I ordered, and then it executed at $40.49, which is absolute horseshit. I bought 260, which is 10k, and it immediately lost $450. No more volatile slippage. I gotta stop afterhours trading.

Tuesday, November 19, 2019

  • Subscribed to Disney+ with the money I made from the investment in its launch. $70/yr. Sent the login to socal to pay it forward.
    • They have all disney, pixar, marvel, star wars, natgeo.
    • I like how they don't autoplay on hover by default.
  • Donated $5 to wikipedia.
  • The forward dividend yield takes the most recent div, normalizes its period to a year (usually), and divides by current stock price to estimate what the next year's div yield will be (if it stays the same as right now). The trailing dividend yield actually looks at a previous timeframe (usually a year), since it has that data, and calculates the %.
  • Matt Stonie ate 100 waffles in 15 minutes.
  • FF moves. 2 for espn, 1 for yahoo. Not much this late, and my teams suck.
  • Robinhood Gold.
    • Instant deposits? Yes.
    • Instant buying power after sell orders? Yes, if market is open.
    • Instant withdrawals? No.
  • Morningstar is the private research company that provides the yield data for yahoo finance and the advanced data for robinhood gold.
  • Tradebot.
    • Display market cap as millions.
    • Made the $/yr ttm slope ranker normalize on price (at the beginning of the time period, the past year) for %/yr, rather than the absolute $/yr.
    • This allowed me to then sum the growth %/yr with the yield %/yr for total return.
  • Generally agree: https://medium.com/@tmitchelhill73/lets-talk-about-the-game-changers-1d76a0c344e5. There are 3 main targets for a vegan diet: Eco, Ethics, Health. The first two are obvious and clear. The third is not.
  • Went to wing ferno. Got the spiciest they had. Pretty good. The chicken was juicy, but I like the batter a bit crispier.
  • Bought two 20lb turkeys at costco. Butterball, $1/lb, with giblets, no steroids/hormones. Best part: it comes fresh, not frozen.

Monday, November 18, 2019

  • DIS went about +8% on tuesday and then -1 each day through the rest of the week. Decided to hold through Monday, after people lazily watched Disney+ all weekend and shared their logins, hoping for another spike. It happened. Sold everything for a total profit of $650.
    • Worth reminding that I did nothing to deserve this. Got $650 for a couple clicks. I don't like the volatility or the rationale of modern investment. I've contributed nothing to the world through these actions, and I've been rewarded for it. Others have dedicated their lives to the same, becoming billionaires. The spirit of investment is the encouragement of new technologies/products/services/etc. We can do this without public trading, for it corrupts more than it enables.
  • Won both fantasy games. Got 3/5 in sbsc.
    • >64% across the entire league in supercontest, our highest ever in the 2018 and 2019 seasons (except week 17, garbage time).
  • Tofu and tempeh are both from soy.
  • Tradebot.
    • Lots of work. General cleanup. Reorganized all the modules in the package structure. Moved some functions around.
    • Generalized get_valid_tickers() to a simple symbol fetcher, allowing downstream functions to filter on cap/price/etc as desired.
    • The reason some of the slopes were broken is that the yahoo historical data had gaps. You'd request a year, and it would only have a month, and that month might have been a great rise while the rest of the year sucked. To fix this, I changed get_slope() to only return if there is statistically significant data (at least 50% of days in the requested time period).
    • There are ~1200 tickers returned by NYSE for >1b cap and <$100 price, but yahoo only has historical data on ~250 of them.
    • Yahoo doesn't return consistent data. Sometimes there are gaps in history. Sometimes there are not. In a standard run for ttm perf on 1200 tickers, different symbols will report dataframe.empty in back-to-back runs.
      • For this reason, I will not multiprocess the main functions in the analysis module.
    • The stock market (well, NYSE) is open every day except weekends and 9 holidays, so 251 days a year (69%).
    • Changed it to not filter >1B and <$100, just analyze ALL.
    • Finished the entire TTM performance effort. Compared to local plots. Compared to google plots. Everything looks good.
    • Finished the rankings for dividend yield. https://gitlab.com/bmahlstedt-group/tradebot/issues/5.

Sunday, November 17, 2019

  • Supercontest.
    • Pick percentage was sorted on for in-progress and finished games, between cover/push/noncover all complement to 100. Pick percentage was not sorted on for unstarted games. I added this as the second-to-last (num_picks, desc), before user ID.
    • Made the late picks email include the recipients in the body.
    • Updated the app to properly adjust for both sides of daylight savings time, which shifts in the middle of week 9: https://gitlab.com/bmahlstedt-group/supercontest/issues/139.
  • The same FPS looks way worse in games than movies. In games, you produce an image and combine them all together for motion. In movies, the camera's shutter is open for a small period of time, so you get motion blur automatically.
  • Bought a 12.5lb turkey. Started thawing.
  • Astros have been cheating for years, banging on trash cans and whistling for offspeed pitches based on cameras.

Saturday, November 16, 2019

  • Started Black Mirror from the beginning. I had only seen maybe 1-2 episodes (and the movie).
  • This channel is crazy: https://www.youtube.com/user/24619carlos.
  • Tradebot.
    • https://gitlab.com/bmahlstedt-group/tradebot/issues/5.
    • Added fetch/analysis/sort for dividend and yield %.
    • Some are as high as >20%, but it's obviously dependent upon price. Some good standards are around 4-5 (verizon, ibm, etc). The securities in the S&P500 average out to about 2% right now.
  • Banner. Ross 12 Remy 13 Franky 14 Art 15. Only two weeks still available.
  • Only about 10% of both Portugal and Brazil speak Spanish. It's pretty similar to Portuguese tho.
  • Categorization is generally good. We can lump objects into groups, and that is a convenience. It's efficient. It saves time. Those waterbreathing soap bars are fish, those large horseless cars are vans, etc.
    • There's nothing wrong with this, when it's applied to objects. To companies. To Food.
    • There is a problem with this, when it's applied to people, because then the group identity is considered before the individual. A stranger sees a tribe, a color, a language, before a person. It is no longer an efficient shortcut, but is instead a presumption; a presumption about something that can change, a complex human being with free will.
    • This applies to good and bad judgement; I don't like X race, I am patriotic toward Y nation. They're the same presumption, the same categorization, and both ultimately become a bias surrounding an irrelevant generalization.
  • Awesome warriors story: https://www.youtube.com/watch?v=fHeAHaxW0nI.
  • Jim Simons is the founder of RenTech. Net worth >21b. Went to Berkeley and MIT for math.
  • Mackenzie Bezos (ex-wife) is the 15th richest american at 36b, all from the divorce settlement. 4th richest woman in the world.
  • Supercontest. Updated last week's single pick for Jeremy.
    • select * from picks where user_id = 6 order by id desc;
    • update picks set team = 'DOLPHINS' where id = 5927;
  • UFC in Sao Paulo.
  • Kaep did a practice workout today. Switched locations at the end, but footage should go to all 32 teams. Curious if anyone tries to pick him up, considering the underperformance of many starters right now.
  • Made pistachio butter. As of right now, pecan butter is still king but I'll try a bit tomorrow after it cools/settles/separates.

Friday, November 15, 2019

  • Ubuntu was busted. Power died while casting, which crashed the video cards or gpu, then the drivers (nvidia?) were trying to write to syslog and filled the entire disk (used >70GB). Booted into recovery mode (escape during startup, drop into root shell). Ran sudo apt autoremove. Then sudo rm /var/log/syslog.
    • Audio devices just listed dummy output so I had to run `pulseaudio -k && sudo alsa force-reload` to get the speakers back.
    • Had to run `sudo pip install py` in the system python env as well.
  • Went to the getty.
  • Unloaded dishwasher. Cleaned. Shaved. Haircut appointment. Thawed mouse. The usual.
  • Jeop tournament of champs over. Holzhauerrrrr.
  • Python 3's addition for types is only type hints. You can enforce types at runtime with other packages, like this one: https://github.com/agronholm/typeguard.
  • Didn't do a huge comparison to piptools or pipenv or sx-setuptools or req-compile, but there's another hot env/req manager called poetry: https://poetry.eustace.io. Sent to Spencer.
  • Mythology!
    • Chaos.
      • -> Gaia (Terra, Mother Earth) -> Caelus (Uranus, Father Sky).
      • -> Tartarus (underworld) -> Typhon and Echidna (mother and father of all monsters) -> Cerberus, Chimera, Hydra, Sphynx.
      • Charon (ferryman), Harpies, Sirens, Gorgons, and Cyclops are all basically distant cousins in this tree too.
    • Titans (all kids of Gaia and Uranus).
      • -> Cronus (Saturn, harvest) and Rhea (Cybele, fertility).
      • Hyperion (light), Helios (sun), Selene (moon), Atlas (carries earth), Prometheus (trickster, creates man from clay, steals god fire and gives to them, etc), and Pandora.
    • Olympians (all kids of Cronus and Rhea).
      • -> Zeus (Jupiter, thunder) and Hera (Juno, women).
      • -> Poseidon (Neptune, sea).
      • -> Hades (Pluto, underworld).
      • -> Hestia (Vesta, health).
      • -> Demeter (Ceres, harvest).
    • Gods (all downstream of Zeus).
      • -> Athena (Minerva, wisdom).
      • -> Dionysus (Bacchus, wine).
      • -> Hephaestus (Vulcan, fire).
      • -> Ares (Mars, war).
      • -> Aphrodite (Venus, love/beauty, actually from Uranus' nuts in the sea lol).
      • -> Hermes (Mercury, messenger) -> Pan (Faunus, shepherding).
      • -> Apollo (arts/medicine).
      • -> Artemis (Diana, hunting).
      • -> Heracles (Hercules).
      • -> Perseus (killed Medusa).
      • -> 9 Muses (inspired artists).
  • Supercontest.

Thursday, November 14, 2019

  • Charlie Meach: https://en.wikipedia.org/wiki/Charles_L._Meach.
  • Afterhours trading (these hours are for NYSE):
    • Premarket: 7-930 (0400-0630 PT) (2.5hrs)
    • Standard: 930-4 (0630-1300 PT) (6.5hrs)
    • Postmarket: 4-8 (1300-1700 PT) (4hrs)
    • Afterhours (both post and pre) are more volatile. You will see more fluctuation between price @order and price @execution.
  • Smoked 10 lbs beef ribs and 10lbs pork ribs for parents and aunts/uncles.
    • Added glaze column to the log
  • AMZN dropped 1.4% bc Nike separated.
  • ASGI (rather than WSGI) is Asynchronous Server Gateway Interface.

Wednesday, November 13, 2019


  • AAPL, MSFT, GOOG, AMZN all have market caps around $1trillion.
  • Supercontest banner. You can try to emulate the background-size/position/repeat with divs and imgs, but it's annoying. Usually easier to just merge the images/gifs with a separate tool (I used Kapwing today). This tech is still terrible for how advanced frontend dev has become.
    • Committed new lines. Submitted picks.
  • There are some interesting balk rules.
    • You can't throw to an unoccupied base.
    • You can't fake the throw to 1st, you have to actually throw it (just like toward home).
    • You can't touch the rubber without the ball.
    • If you drop the ball, it's a balk.
    • The commit angle for your step is an even 45deg between home/first.
  • Parents in town. Walked up to Manhattan Beach.
  • DIS doing well.
    • Over 10 million signups since launch yesterday.
    • My 10k was up $500 by 11am. Things looking much brighter after the launch bugs yesterday.
    • Up 7% at close. Continued another 1% in the first hour of afterhours.

Tuesday, November 12, 2019

  • Ariel Halwani had the rock, nick diaz, stipe, francis ngannou, rose, woodley, and maia on the podcast. Wow.
    • Something was wrong with nick diaz.
  • Bought 69 shares of DIS in anticipation of Disney+ launch this week. Placed 136.75, executed 138.08. I'll exit fairly soon, once initial surges quell.
    • Would have been positioned about $1.50 (10% less) had my damn transfer cleared a few hours earlier. It took a week in total.
    • They had tech issues due to higher-than-anticipated traffic. This has both good and bad indication; good for desire/popularity, bad for ux/reputation. Overall, probably bad, or at least it will delay the rise. I'll hold.
  • Went 1-1 in ff and 2.5/5 in sbsc. Exactly 50/50 week.
    • Waiver moves: 3 espn 3 yahoo.
  • Fresh order.
  • Started The Usual Suspects but turned it off after 10 minutes. Was slow and old.
  • Not really impressed with the farnam street publication either.
  • Tradebot.
    • Read an interesting article about how the same strategy will perform better on international stocks than US stocks, because our markets are more competitive with the biggest players.
    • Each market has a unique way to win. They're not the same. This is because each market has big player(s) who focus specifically on it, and will inevitably sway with their larger weight.
    • A black swan event is just an extremely rare occurrence.
    • Going to just do long positions for now, due to both time and the impending decline. I'll transition to daytrading using more complex models at a later time.
    • 43 companies on NYSE with a market cap >200B. 1189 with >10B.
    • Wrote my current final draft. Finds all symbols >=1B market cap, with stock price <=$100, then calculates their slope over the past year via simple linear regression. It then reports the top 20, ranked.
    • List this time: https://gitlab.com/bmahlstedt-group/tradebot/blob/master/2019_11_12_stocks_by_perf.txt.
    • I can run this every quarter (or whatever frequency I want) and hold for a year (or whatever period) then sell.
    • Closed https://gitlab.com/bmahlstedt-group/tradebot/issues/4.
  • Made config, infra, and tradebot repos public. Only the services need be private.
  • Ravens - Pats - Niners for power rankings: https://www.cbssports.com/nfl/powerrankings/.
  • Supercontest.
  • Holzhauer won tonight, so in the finals of the tournament of champions it's going to be him vs the woman who beat him in the regular season vs whoever wins tomorrow. Chance for redemption!
  • Set up verizon wifi calling on my phone. Had to put an address in for emergency services.

Monday, November 11, 2019

  • New season of rick and morty started last night.
  • Popeyes chicken sandwich!
  • Art's bday yesterday.
  • The blue planet and planet earth shows are awesome.
  • Supercontest.
    • I haven't really designed the site for accessibility as much as I could have. Wonder if there are any colorblind folks who are having issue with the tables.
    • Added late picks for jeremy.
    • Played with the idea for user pick similarity, but ultimately didn't implement: https://gitlab.com/bmahlstedt-group/supercontest/issues/136.
  • Finished mindhunter season 2.
  • Unsub = unknown subject.
  • Niners Seahawks MNF.
  • Tradebot.
    • Ran yahoo-ticker-downloader (python module) to get a csv of ALL symbols. Ran for about an hour before cancelling, it was nowhere near done. It literally just brute forces the yahoo finance rest api for every permutation of characters.
    • There are 11 stock sectors: Energy, Basic Materials, Industrials, Consumer Discretionary, Consumer Staples, Healthcare, Financial, Information Technology, Communications, Utilities, Real Estate.
    • Created an account with nasdaq, looked through a bit of their data.
  • Rendered the rib/belly fat down for turkey injections.
  • Cleaned the house, including window washing and vacuuming.

Sunday, November 10, 2019

  • Supercontest.
    • Made the frontend ranking only consider completed games, not in-progress or unstarted. The sorting still considers completed and in-progress, but not unstarted. Remember, the backend db scores points for all matchups, even unstarted ones, so that the client can do with the information at will.
  • Derek is in LA, went up to Santa Monica.
  • Bezos looking to own NFL team: https://www.cbssports.com/g00/nfl/news/amazon-founder-jeff-bezos-interested-in-owning-nfl-team-has-strong-support-among-current-owners.
  • After ribs (for family visit) and turkey (for friendsgiving), I'm going to make bacon.
    • Just cure a pork belly with your sodium nitrate (same as when I made pastrami beef ribs), then smoke and slice.
  • I like Gitlab's transparency about competition: https://about.gitlab.com/blog/2019/11/01/devops-tool-landscape.
  • Kubernetes means pilot in Greek. It was originally called Borg when it started at Google, simply a tool to manage many many distributed servers.
    • A cluster has nodes (machines, physical or virtual). A node has pods (containers).

Saturday, November 9, 2019

  • Merged identical google contacts. Added Savanna/Charlie/Grayson bdays to google calendar.
  • Interesting, an article debunking fasted cardio: https://medium.com/@straighthealth/does-fasted-cardio-work-48fce94c2d75.
  • Saw Doctor Sleep last night. Was great.
  • Spaced repetition has been proven, time and time again, to be the best way to retain information and improve memory. I need to start re-reading my blog again.
  • Self-hosting.
    • The DO droplet is sitting comfortable at 75% mem and 70% disk.
    • It's 1 shitty (v)cpu, 1GB mem, and 25GB ssd. $5/mo.
    • Under any duress, this cloud server falls over and I have to restart my containers.
    • For next year, as the app scales, I'll self-host. I can set up a permanent rig for <$500 with 10x the performance. It's $5/mo, or $60/yr, so if it lasts the better part of a decade I've broken even financially for a much better machine.
    • Will require me to use the registrar (godaddy) for DNS, rather than DO.
    • I can bring my bmahlstedt.com containers back up with the extra performance room.
    • Will have to implement another monitoring solution. Basic metrics (cpu/mem/disk) and email notification. Sensu, another; there are a million.
    • I can also get much better internet at my next house. No cable, no phone - just fast internet.
    • Created the ticket: https://gitlab.com/bmahlstedt-group/supercontest/issues/135.
  • Jcriss jits in long beach. UFC in moscow.
  • Instagram gonna start hiding likes. Good. Hide followers and everything else too. Influencers need not be given a notorious platform to contribute nothing.
    • Ironic that Adam Mosseri drops this news the same week as the Logan Paul and KSI 2 fight, two humans who have become famous for said trivial superficiality.
  • I really should open a restaurant:
    • Going to rerender the bacon and rib fat for injections on the upcoming turkeys. There's probably 16 ounces.
  • Early UFC days were insane. No gloves, no weight classes, a guy wearing a gi, blows to the back of the head, hair pulling, terrible strategy, towel throwing, terrible commentary, stomping. Incredible.

Friday, November 8, 2019

  • Renaissance Technologies is the most successful quant fund.
    • https://www.renfund.com.
    • They're ~300 employees, and are based in NY.
    • Their medallion fund has the best record in investing history. It's based off Baum's models and has gotten 66% gross annualized return (39% after fees) for 30 years (88-18).
    • They are a collection of scientists, not wall street buffs. They have PhDs in math/cs, not economics/finance.
  • Disney jumped 5% from the earnings report, and will still have the disney+ launch next week.
  • Chiro.
  • Finished mindhunter season 1, starting 2.
    • Real: ed kemper (the coed killer), montie rissell (the guy who wanted Big Red), benjamin barnwright (the fiance), jerry brudos (shoes), richard speck (ripe c*nts), david berkowitz (son of sam), dennis rader (btk killer, adt serviceman).
    • Not real: dwight taylor (the grandma/dog killer), roger wade (principal, tickler).
  • Made 5lbs maple peanut pecan butter. Tried without roasting. Definitely better roasted (and blends faster). Gonna try macademia, hazelnut, and pistachio next (individually). They're all about $1/oz, which means a batch is ~$30. Peanuts are the cheapest, then tier 2 is pecans/cashews/etc. These nuts are tier 3, most expensive.
    • Hazelnuts = Filberts. Nutella is made from these.
    • Ordered 2lbs of each. $100.
  • Smoked 20lbs ribs. That's 43 sessions on this smoker, and it's been almost exactly a year. Almost once per week!
  • Made new batch of 12 shake jars.

Thursday, November 7, 2019

  • Unsubscribed from all bloomberg publications (I had maybe ~4 in daily digest). I find them redundant, half the good content is hidden behind a paywall, it's verbosely delivered in paragraphs instead of bullets, and it focuses more on politics / international affairs than tech / business / software / finance.
  • Supercontest. Made the leaderboard sort the EXACT same as the all-picks, except summed over all weeks and only for completed games. Before, it didn't do the same "1 cover over 2 pushes" etc.
  • Trimmed and brined 2 racks of pork spares (10lbs) and 2 racks of beef short (10lbs) for the smoker tomorrow.
  • Today's music: snow patrol.
  • Bud light launching their seltzer next year:
  • Doctor Sleep comes out tonight, Stephen King's sequel to The Shining. It follows the son, Danny Torrance, who escaped the Overlook.
    • Between IT, Castle Rock, and now this - I love how much mainstream attention King is getting. Been a fan for many years.
  • datetime.fromtimestamp() should always be passed a timezone. Integers are naive, and must be made timezone-aware, otherwise it will have to assume. Some assume UTC, some assume the system-locale tz, you can never be sure. Be explicit instead.
  • The UFC fight this saturday is in Russia. Zabit and Greg Hardy on the card.
    • Logan Paul vs KSI 2 is also this saturday. Ugh.
  • Resolved the 24 payment situation; it had reported confirmation but then rejected it weeks later. Paid for the past 2 months, ensured it was still on autopay with the card swapover. Dude at the front was nice, Joe.
  • I'm liking the recent food changes:
    • Oats and water raw instead of oat milk in morning shake.
    • +Banana +Seeds for the morning for a more complete breakfast.
    • Veggies raw in smoothie, rather than juiced. No waste. 
      • No more lab powders: whey, glutamine, etc. All natural: cinnamon, maca, etc.
  • Remember it's much easier in python3: super().__init__()
  • Tradebot.
    • Finished the entire framework. Now I just need to run tests to optimize. This step is crucial. Selection is easy, but overfitting is also easy.
    • Another +1 for the backtrader package. Full-featured, and very well documented.
    • You can add analyzers, including final sharpe ratio reports.
    • Example output from my quick sma strategy on msft for ytd:
    • Wow. Look how many indicators come built-in: https://www.backtrader.com/docu/indautoref/.
    • RSI = relative strength index.
    • Keep in mind that every single ticker would optimize around a different strategy with different parameters. You can lump markets together with decent accuracy, but things will even then change along a chronological axis. There's no perfect approach for all situations for all time.

Wednesday, November 6, 2019

  • Did some searching for spicy food challenges. Almost all are way north. None in south bay really.
  • Supercontest.
    • Updated the text in the payment section of the rules.
    • Made the saturday email reminder 5pm, not 8pm.
    • New banner. Standard wednesday deployment.
    • Renamed all the files in the banner archive to include the buyer.
    • New rule - you can pay incrementing $5 to take down the previous banner and put yours instead?
      • Eg: Person 1 buys standard $5 banner. Person 2 hates it and pays $10 for their own banner. Person 1 gets their $5 returned. Person 3 hates them all and pays $15 for a third banner. Person 2 gets their $10 returned.
    • Committed lines, submitted picks.
    • Made the rankings grouped properly: https://gitlab.com/bmahlstedt-group/supercontest/issues/134.
    • Abstracted the ranking cell color to a common layer, and added it back to all-picks (now that ranks are tie-grouped accurately).
  • Final FF moves, got everybody except the defenses in both leagues (7/9 successful waivers).
  • Upgraded the citi account in mint.
  • Seaborn is a wrapper around matplotlib for visualization in python: https://seaborn.pydata.org/.
  • So many people took advantage of the robinhood glitch. This is bad. All the SEC and public attention...wouldn't be surprised if they get temporarily disabled for an audit, or shut down completely as malpractice, or even long-term bankrupted due to poor reputation.
    • I'd have to rewrite all my logic around another broker's API. Woohoo.
    • I'd also start having to pay commission again. Woohoo.
  • The glitch itself:
    • With gold, robinhood gives you some margin based on the cash in your account.
    • If you buy shares, and then sell them as options, robinhood would double count both in your total value, so it would allocate you more margin. That's the bug.
    • You could repeat this until you had infinite money. People were posting screenshots of >1M positions, starting with 1k.
  • Went to Clippers/Bucks with Harner.
  • Ta-eem grill on Melrose. Mediterranean kosher. Delicious.

Tuesday, November 5, 2019

  • Tradebot.
    • Read a bit more about backtrader, both for general strategies and specific backtrader syntax.
    • Robin-stocks has a ton of useful information. http://www.robin-stocks.com/en/latest/functions.html#getting-stock-information. Basically everything that's available about your account, holdings, and the entire public market.
    • Added the full capability to transact remotely. Can login, view all account data, buy, sell, market, limit, etc. Closed the ticket. https://gitlab.com/bmahlstedt-group/tradebot/issues/2.
    • Wrote the backtester components.
      • Starting money.
      • Quantity to buy.
      • How and when to buy.
      • How and when to sell.
      • Commission.
      • Online ingestion of yahoo finance data, current and historical.
      • Reporting of portfolio performance: gross profit and % change.
    • The buy/sell triggers right now are very simple, using basic analytics on the past couple days' closing price. I'm off to the indicators section next, using SMA and then more complicated models.
  • A single AA battery has 2000-3000 mAh, about the same as a phone battery.
  • Lost both FF games and got 1.5 in sbsc.
  • The columns in the user table for email prefs were non-nullable but had no defaults, so registration was broken.
  • FF moves. 4 for ESPN, 5 for Yahoo. Lotta bye weeks.
  • Under armour dropped 18%, under investigation for fluffing sales numbers.
  • Muse again today. Lots to go through. Solid.
  • Gonna try vegan protein powder again, from peas and brown rice instead of whey isolates.
    • Bought Orgain. $12/lb, similar to my standard Optimum Nutrition bin.
    • More carbs (all fiber). Slightly higher fat (couple grams). Slighly lower protein (couple grams).
  • Bought sesame and chia seeds.
  • Apple donated 2.5B (FB and Google made similar smaller donations) to make bay area housing less insane.
  • Edge is the new Microsoft browser (RIP Explorer), and it launches Jan 15. It's built off of Chromium, Google open-source Chrome. Weird.
  • Transferred 10k from BOA to Robinhood for the tradebot to experiment with.
  • Other options besides GTC: https://www.investopedia.com/terms/t/timeinforce.asp.

Monday, November 4, 2019

  • McDonald's fired its CEO because of a relationship with an employee. Yay accountability! I've seen the exact opposite in my career.
  • TikTok is owned by a Chinese company, and is undergoing a security audit because of that implication.
  • New season of silicon valley started last week.
  • Lewy Bodies are deposits of the alpha-synuclein protein on the brain, causing erratic dementia.
  • Jeopardy tournament of champions is back, including Holzhauer.
  • Quick refresher on numpy. Matrix and linear algebra functionality.
  • Quick refresher on pandas. Series is 1d. Dataframe can have more dimensions. Can group, sort, reshape, statistics, all the standards you'd expect.
  • Sharpe Ratio is the metric for portfolio success, adjusted for risk.
    • (return - risk_free_rate) / standard deviation of excess return
    • Return in excess of risk, averaged per unit of risk.
    • The higher the Sharpe Ratio, the better.
  • Lol stefon diggs on family feud: https://www.youtube.com/watch?v=jFJaJTXvWl0.
  • Tradebot:
  • Business school applications are reducing in quantity. Good. STEM needs more.
  • Ordinals, like datetime.toordinal, are integers that indicate the number of days since a specific epoch. They represent dates like YYYY-MM-DD in sortable fashion, or for regression, or for whatever else. They can be relative to the proleptic julian calendar, or proleptic gregorian, or others.
  • Unix timestamps are the number of seconds that have elapsed since 1970-01-01 (midnight, the beginning of that day). Every ~31.5 million seconds is a year, so we're at about 1.5 billion.
  • Listened to muse most of today.
  • A cat ran on the field during the MNF game and delayed it for a couple minutes!
  • P/E is great for comparing companies apples-apples, because it's normalized by share price. market value per share / earnings per share (eps). It can go negative, although this will usually just be reported as NA (losses, usually). Higher P/E is obviously more favorable for the outlook of the company.

Sunday, November 3, 2019

  • UFC 244, good all around. Prelims had some great finishes. Crazy to have the BMF title fight end with doctor stoppage - he might catch some flak for that. I like masvidal, he's growing on me.
  • Canelo fight, was losing but then got the knockout in the 11th.
  • Love a good visual comparison between NYC and SF: https://medium.com/conquering-corporate-america/the-difference-between-living-in-new-york-and-san-francisco-3e8ae58832a5.
  • Supercontest.
    • DST ended. The app handled it well.
    • Fixed the sort on pick percentage to properly count failures.
    • The logo background-image was conflicting with the css background linear-gradient, so I have the color on the td and the team helmet on a div within the td.
  • I really enjoyed the comparisons of amazon (sales %) vs kayak (pay per query), as well as orbitz (sell natively) vs kayak (redirect to sell), when doing my pharmaceutical modeling. Here's a similar comparison between Ben & Jerry's (slow) vs Amazon (fast): https://www.joelonsoftware.com/2000/05/12/strategy-letter-i-ben-and-jerrys-vs-amazon/.
  • Watson had some incredible saves in his game against the jaguars this morning.
  • The NFL schedule was nicely spread out this week: 1 thurs, 1 sun early, 6 sun morning, 4 sun afternoon, 1, sun night, 1 mon.

Saturday, November 2, 2019

  • Ufc data: https://gist.github.com/martj42/695f9a976b7beaa11617840467ac0352.
    • Post image
  • Remember to run a bash command from ipython, just start the line with an exclamation mark.
  • Tradebot.
    • Added all reqs.
    • Got live prices with yahoo_fin, at first. It's an extremely simple package, basically just fetching data from yahoo.
    • It was only about 400 lines, and was a poorly written package (didn't even specify requirements), so I gutted and rewrote it myself. Condensed to about 100 lines. Delinted.
    • Created a ticket to adjust risk based on ISM PMI later: https://gitlab.com/bmahlstedt-group/tradebot/issues/3.
    • EPS = earnings per share.
    • TTM= trailing 12 months.
    • YOY = year over year.
    • MRQ = most recent quarter.
    • EBITDA = earnings before interest, tax, depreciation, and amortization.
    • PEG = price/earnings-to-growth.
    • Data fetch capability is complete.
    • I now have a few decisions to make, as to the strategy/stance the bot uses to trade:
      1. Get the day's biggest losers, run regression/ML on the historical data (how far back?) for all 100 to see who is trending positive, and buy at that low. Get the day's biggest winners, and sell any you're holding at that high.
      2. Use analyst/earnings/stats. Decide which ones, do an instantaneous fetch, and trade based on those numbers.

      Friday, November 1, 2019

      • I've tried the following crutch sauces for the final hour or two, all under 250 or so to ensure any sugar content doesn't scorch:
        • Honey, agave nectar, maple syrup, brown sugar (dry), bbq sauce, mustard, hot sauce.
        • Honey is champ, by my own (known) preference, as well as others (blind).
        • Mix it with a little more of the dry rub. Delicious.
      • All of the avengers dudes (robert downey jr, ryan reynolds, paul rudd,etc) have a fantasy league for charity: https://fantasy.espn.com/football/league?leagueId=48153503.
      • Sigur Ros most of today. Good background.
      • Ordered some more large candles, I ran out of big coffee table / non-bedroom ones. About $1/oz is a decent average.
      • Services have much better product margins than products. I love my industry.
      • Disney+ launches this month. I'm very curious about that landscape, and how Netflix/HBO will perform in reaction.
      • GitHub renewed its ICE contract and employees are not happy: https://www.latimes.com/business/technology/story/2019-10-31/github-ice-contract-defense. I'm not anti-microsoft, but this is good news for GitLab.
      • Always like a good "useful command line tools" article, especially with screenshots: https://www.wezm.net/technical/2019/10/useful-command-line-tools.
      • The supercontest app should withstand the end of daylight savings time without any issues. Everything is synced, the machines are configured to the correct timezones, and nothing is hardcoded - it's all referenced and localized in realtime. Lockdown should occur as usual, all the timestamp rerenderings should convert properly, etc.
        • Sidenote - part of the reason it occurs at 2am instead of 1am (in general) is so that you avoid any day shift. If at 1am it jumped backed to midnight, there might be confusion.
      • Also removed the "check in paid league" for the saturday pick reminder. It does it based on subscription now.
      • Played around a little bit with 23andMe.
      • Matt Stonie's halloween video yesterday was 122 pieces of candy in 30 minutes: https://www.youtube.com/watch?v=GiN8ZPMUVXY.
        • This is 895g, or 2 pounds, of straight sugar.
      • New batch of protein bars. Homemade peanut butter (much higher ratio of this than usual), protein powder, oats, oat milk, dates, agave nectar.
      • Started mindhunter.
      • Niners and Patriots 8-0, Saints and Packers 7-1, Vikings and Seahawks 6-2.
      • These are the cardinal divisions:
        • The NFC mostly makes sense, with the exception of the cowboys in the east.
        • The AFC would mostly make sense if the colts and dolphins switched switch south/east.
      • UFC245 press conference. Can't wait. 3 titles on the line. Holloway vs Volkanovski, Usman vs Covington, and Nunes vs Germaine de Randamie.
      • The Rock had an announcement at the press conference. Given all the hype, I had thought it was gonna be "I'm gonna fight brock lesnar" or "I'm partnering with the UFC to have fighters on my ninja warrior show" or something meaty. It was just that his media company, Seven Bucks Productions, is gong to be making a movie about Mark Kerr (an older UFC fighter from the Mark Coleman era), and he'll be playing him.
      • Elon said he's "Going offline" on Twitter.
      • True:
        • Simple Fixes
      • Worked a little bit on the tradebot.