Skip to content

Instantly share code, notes, and snippets.

@fela
fela / manifold_tips.md
Created November 27, 2024 14:55
Manifold tips

Market making in high-volatility market. Most of my profits come from market making in highly volatile markets. When there are polarizing questions, and the market swings back and forth, it's a good time to set limit orders.

Think about when news can come in. Understanding when news might drop is crucial for deciding how long to keep limit orders open. If no meaningful new information is expected, limit orders are relatively safe. If news is likely, be more careful.

Set deadlines on your limit orders. Leaving limit orders open indefinitely makes you vulnerable to adverse selection—your order will fill only when it's a bad deal for you. Always set a deadline.

Understand how news can move the price. News often only moves the price in one direction, while the price may naturally drift the other way over time. For example, in "Will X happen by T?" markets, it's usually safer to put limit orders on YES, but buying NOs means you risk only getting filled if X has already happened. Bye bye mana.

@fela
fela / gpt_fda.txt
Created March 30, 2023 20:06
GPT Analisis of file
# Assistant:
{"comment": "Printing first few lines of the file", "python": "with open('food-enforcement.json') as f:\n for i in range(3):\n print(f.readline().strip())"}
## Extracting comment:
Printing first few lines of the file
## Extracting python code:
with open('food-enforcement.json') as f:
for i in range(3):
print(f.readline().strip())
## Do you want to execute this code? (y/n)
y
@fela
fela / zane_zaphyr.md
Last active February 17, 2023 19:39
A story by Bing Chat
@fela
fela / snape.py
Last active January 5, 2022 22:46
from collections import defaultdict
def all_pairs():
for n1 in range(2, 65):
for n2 in range(n1+1, 65+1):
yield n1, n2
def prod(pair):
#!/usr/bin/env python3
import sys
from random import random
def single_trial():
"""
Generate a random 2 dimensional point between (0, 0) and (1, 1)
and returns weather the distance to the origin is less than 1
#!/usr/bin/env python3
RADIX = 10
# radix sort that works for non negative integers
def radix_sort_nonneg(lst):
last_iteration = False
radix_power = 1
while not last_iteration:
@fela
fela / hatN.R
Last active August 29, 2015 14:08
#########################################
# helpers #
#########################################
# helper to calculate s
s.func <- function(X) {
# norms ^ 4
norms4 <- apply(X, 2, function(Xi) (Xi%*%Xi)^2)
n <- ncol(X)
@fela
fela / keybase.md
Created September 23, 2014 09:10
Keybase proof

Keybase proof

I hereby claim:

  • I am fela on github.
  • I am fela (https://keybase.io/fela) on keybase.
  • I have a public key whose fingerprint is 0875 81C7 564F 1E05 5EE3 8D05 7B0D 4361 506C 15B0

To claim this, I am signing this object:

@fela
fela / selfX.rb
Created July 4, 2013 15:26
The output of this script is equal to the script itself.
#!/usr/bin/env ruby
x=<<'X'
#!/usr/bin/env ruby
x=<<'X'
x+="X\n"
x=x.split("\n")
x=x[0..1]+x[0..7]+x[2..-2]
puts x.join("\n")
X
x+="X\n"
#!/usr/bin/env ruby
$VERBOSE = true
$:.unshift File.dirname($0)
require 'Qt4'
module Shoes
def self.app &blk