This markdown file is a walkthrough of my current process in trading on Kalshi's market for TSA check-ins.
The TLDR about what I did here is:
- data collection through web scraping and API usage
- data analysis to identify trends
- machine learning to create a predictor
- price estimation with some statistics
- backtesting development for trading algorithm testing
And I ended up with an EV of $1.17 for each $1 I traded!
There is a notion for Rubik's cubes of "God's Number" - the most moves any cube can be from the solved state. We show in rubik-tree that for 2x2x2 cubes, God's Number is 14 when considering a quarter-turn of any face a move.
I admit there is a lack of rigor in two places:
-
I couldn't come up with a way to verify the accuracy of my simulations of manipulations of a cube aside from comparison to real-life results.
-
You will see my argument for our construction of a proof lies outside of Coq. I took this course concurrently with Basic Algebra I, so my familiarity with the group theory ideas we would need for a concrete proof is weak to begin with, and implementing such a proof in Coq seemed beyond my ability. As such, it is a little hand-wavy.
Despite these weaknesses, I enjoyed playing with the abstraction between interpreting a cube state as a list of transformations and as an explicit combination of colors during the proof of inversion_solves and it's supporting lemmas. I also found some satisfaction in designing the color_tree data structure. I don't think I've used such a data structure before, but it greatly improved the runtime of perm_n. Before its implementation, (perm_n 9 x x) failed to complete in 12 hours. After, (perm_n 15 [solved'] init_tree) runs in around half an hour.
An
Calling the algorithm
A brute-force algorithm for this puzzle I got for Christmas.
I don't feel so bad about using brute-force, since this problem is probably not solvable in poly-time. A sketch of a proof follows (everything is 0-indexed).
We define a Grecian Computer with a target sum
Any Subset-Sum problem
- Create a Grecian Computer
$GC$ with$n+1$ radii and$n+1$ rings with target sum$x$ . - The base ring
$R_n+1$ has all values equal$0$ , except$R_{n,n,i} = V_i$ , and$R_{n,i,n} = x$ for$i \neq n$ - Every other ring
$R_i$ is all holes excluding$R_{i,0,i}$ which is$0$
This transformation takes
Now, if we get a solution to the
Therefore
The motivation for this project is a bit dubious. In 11th grade my highschool administration began limiting student internet access. One of the limitations they made restricted Youtube access to only videos which the administration had placed on a whitelist. My friends and I were beginning to be interested in poker, and wanted to watch professional tournaments during study hall. Of course, none of these videos were whitelisted, and so I developed this tool so that we could watch them anyway.
The script works by navigating Youtube through its source code. It scrapes results from a user-entered query. The user selects a video from these results, and the script now scrapes the source url for the video content.
I rewrote some of the webscraping to make the script functional again (as of 12/30/2022) since Youtube source code updates had completely broken it. The organization and style of the script remain untouched which provides a snapshot of my highschool coding brain.
Potential TODOs:
- streamline user interaction system
- allow for selection of video quality
- support sourcing viral videos
- source links for immensely popular videos (like Waka Waka) receive a 403 error