Randomness extractors: making fair coins out of biased coins

Marton Trencseni - Sun 26 May 2024 • Tagged with randomness, extractors, biased, coin, fair

I discuss various models of biased bit sequences, and how to extract uniform random (or close to it) output bit sequences from them, illustrated with Python code.

Coin flip

Continue reading

Writing a simple Python async message queue server - Part III

Marton Trencseni - Wed 22 May 2024 • Tagged with python, async, message, queue

In this final post on the toy Python async message queue server implementation, I make further feature and code improvements.

.

Continue reading

Writing a simple Javascript async message queue server - Part II

Marton Trencseni - Sat 11 May 2024 • Tagged with javascript, async, message, queue

I write a somewhat more complicated, but still relatively simple async message queue server in Javascript.

.

Continue reading

Writing a simple Javascript async message queue server - Part I

Marton Trencseni - Sun 05 May 2024 • Tagged with javascript, async, message, queue

I write a simple, bi-directional async message queue server in Javascript.

.

Continue reading

Paper review: A Comparison of Approaches to Advertising Measurement

Marton Trencseni - Wed 01 May 2024 • Tagged with ab-testing, facebook, stratification, propensity

Why are Randomized Controlled Trials (RCTs, known as A/B testing in much of the industry) testing is widely regarded as the golden standard of causal inference? What else can a Data Scientist do if A/B testing is not possible, and why are those alternatives inferior to A/B testing?

This papers shows, using 15 experiments (for ads on Facebook) where a RCT was conducted, that common observational methods (run on the Facebook data, by ignoring the control group) severely mis-estimate the true treatment life (as measured by the RCT), often by a factor of 3x or more. This is true, even though Facebook has (i) very large sample sizes, and, (ii) very high quality data (per-user feature vector) about its users which are used in the observational methods. This should be a major red flag for Data Scientists working on common marketing measurements (such as marketing campaigns) using observational methods.

Continue reading

The Culture of Powerpoint

Marton Trencseni - Thu 18 April 2024 • Tagged with powerpoint, nasa, edward, tufte, amazon, bezos

Last year, in 2023, Dennis Austin, one of the original developers of Powerpoint passed away. The news made it to the front page on Hacker News, and prompted a lively discussion of the merits of Powerpoint itself. I posted a top-level comment, which itself sparked a lively thread of responses. In this post I will expand and extend my points about Powerpoint in a business settings, after pointing to hard-learned lessons from Edward Tufte and Jeff Bezos.

Continue reading

Student paper: The Exciting Physics of an Excited Universe

Marton Trencseni - Thu 11 April 2024 • Tagged with physics

Based on the book Compact Stars by N. K. Glendenning a general relativistic treatment of pressure and energy in compact stars is given, followed by simple models of neutron and quark stars. Hypothetical strange quark matter and strange stars are introduced highlighting the importance of sub-millisecond pulsar detections. (Note: this is a student paper I wrote sometime in 2008-2010.)

Continue reading

Paper: Monte Carlo Experiments of Network Effects in Randomized Controlled Trials

Marton Trencseni - Tue 09 April 2024 • Tagged with ab-testing

I run Monte Carlo simulations of content production over random Watts-Strogatz graphs to show various effects relevant to modeling and understanding Randomized Controlled Trials on social networks: the network effect, spillover effect, experiment dampening effect, intrinsic dampening effect, clustering effect, degree distribution effect and the experiment size effect. I will also define some simple metrics to measure their strength. When running experiments these potentially unexpected effects must be understood and controlled for in some manner, such as modeling the underlying graph structure to establish a baseline.

Continue reading

Peak personal computing, or, my current workstation setup

Marton Trencseni - Mon 08 April 2024 • Tagged with computer, workstation, cpu, gpu, ram, monitor, nvidia, razer

Even since I've had a 386 in my room as a teenager, I've taken computers apart and modified and upgraded them. When getting a new workstation computer, I have never bought a pre-assembled one (like a Dell or HP), I always buy the components and build it myself. I've been doing this for 30+ years, so I'm used to it, it's part of my lifecycle. I built my current workstation in 2022, but due to reasons I describe in this post, I've been making a fair amount of modifications to it ever since. Finally, now in 2024 April, I feel that the system has come together and is perfect — I don't want to or plan to make any more changes to it.

Continue reading

I ❤️ open source, and, Cloud9 still rocks

Marton Trencseni - Fri 05 April 2024 • Tagged with coding, ide, c9, open, source

For the past 8 years I've been using Cloud9 for writing code in the cloud, and I can wholeheartedly recommend it: it just works for me. 7 years ago AWS acquired the company, so the project is no longer developed. However, this is not a problem, since it still just works. The only problem I ever had was a minor UI bug, which I fixed in a couple of minutes, as detailed in this post. This was possible because Cloud9 is open-source. I ❤️ open source.

Continue reading

Papers

Marton Trencseni - Sat 30 March 2024 • Tagged with academia, papers

A compilation of academic-style papers I have written over the years.

Continue reading

Stock returns of simple trading strategies

Marton Trencseni - Fri 22 March 2024 • Tagged with markowitz, volatility

I clean up the code I wrote for earlier posts, and run simple trading experiments.

.

Continue reading

The volatility of simple trading strategy returns

Marton Trencseni - Sat 09 March 2024 • Tagged with markowitz, volatility

I investigate the volatility of aggressive take-profit strategies on tech stocks.

.

Continue reading

Introductory investigations into the stability of stock price volatility

Marton Trencseni - Sun 25 February 2024 • Tagged with markowitz, volatility

I investigate the volatility of some securities, and its stability over time.

.

Continue reading

2024 Data Outlook

Marton Trencseni - Sun 11 February 2024 • Tagged with outlook, 2024, datahub, capm

It is the beginning of the year — a good time to reflect on the previous year and make plans for the year ahead. I wrote this document for my team members in 2024 January to kick off the year. This is an abridged version with sensitive content removed.

.

Continue reading

How to achieve high performance, and, ratings

Marton Trencseni - Sun 21 January 2024 • Tagged with okr, goaling, performance, people, management

I wrote this document for my team members — Data Scientists and Data Engineers — to help them do a better on their annual performance reviews.

Watts-Strogatz

Continue reading

Wordcount III: Beating the system `wc`

Marton Trencseni - Fri 29 September 2023 • Tagged with c++, wc

In this follow-up to the previous article about writing a C++ version of the Unix command-line utility wc, I make some modifications to beat my system wc in performance tests.

wc

Continue reading

Wordcount II: Introducing a cleaner C++ class hierarchy to `wc`

Marton Trencseni - Sat 23 September 2023 • Tagged with c++, wc

In this follow-up to the previous article about writing a C++ version of the Unix command-line utility wc, I make the class structure more complicated to keep separate concerns and functionality in different C++ classes. The result ends up being significantly more complex than the original, but does not make the overall program easier to understand or modify.

wc

Continue reading

Wordcount I: Implementing the Unix command-line tool `wc` in modern C++

Marton Trencseni - Sun 10 September 2023 • Tagged with c++, wc

After reading the excellent book Beautiful C++ about the language's latest features, I implement the Unix command-line tool wc in modern C++.

Beautiful C++

Continue reading

Better be first 99% of the time than second 100% of the time

Marton Trencseni - Fri 25 August 2023 • Tagged with book, hft, trading, fpga

A review of the Donald MacKenzie's book Trading at the Speed of Light, which gives an excellent history and inside-peek of the world of High Frequency Trading, or HFT.

Trading at the Speed of Light

Continue reading