BrononymousEngineer

u/BrononymousEngineer


r/investing•

I figured this would be a relevant post considering an article that recently came out: SEC Chairman Says Banning Payment for Order Flow Is 'On the Table'

Disclaimer: I'm simply condensing some thoughts I've had on payment for order flow (PFOF). I'm just a casual observer, and this is the internet. For all you know everything I'm about to say is complete BS.

Payment for order flow =/= front running (which is already illegal). Nothing I have seen or experi

2133

r/learnpython•

I've been learning C/C++ lately, and I've started to come across a decent amount of code that is 'aligned'...here is what I mean:

Not aligned (C/C++):

int some_int = 3;
float some_float = 2.3;

Aligned (C/C++):

int   some_int   = 3;
float some_float = 2.3;

To me the aligned code looks much nicer/more readable. Here is a Python scenario that I think illustrates where aligning the code massively improves readability:

Not aligned (Python):

class Transaction:
    def __init__(self, datetime: dt.datetime, qty: int,
        price: float, contract_size: int
    ) -> None:
        """Some docstring"""
        self.datetime = self.__set_da
514

r/learnpython•

Background:

I'm working on my largest project to-date. It started out as a huge script (~1500 lines of code) a couple years ago with nothing but functions, and as I've learned more about programming in general and what exactly I'm trying to do in the first place, I've gone through several rewrites.

On the most recent iteration I'm trying to structure it like a package with logical units living in sub-packages, and I'm realizing I really have to think harder about good directory structure, good documentation, and code modularity.

Because there are now thousands of lines of code spanning multiple files/folders, classes inheriting from other classes and sometimes interacting with comple

117

r/OMSCS•

Hi all, apologies if this isn't exactly the right sub for this...

Found out about OMSCS a couple days ago, and after some light research, it seems like something I would be very interested in. The thing is that I am not currently interested in switching careers -- my main interest here lies in simply expanding my knowledge/skill set. I would be staying at my current job during and after going through the program (assuming I end up applying and get accepted).

Background: I have a bachelor's degree in mechanical engineering, and have currently been out of school and working in the automotive field for a little over 3 years. My day to day deals with simulation/testing/data analysis, and I

2132

r/algotrading•

In light of the recent news that Quantopian is shutting down, I thought it would be interesting to see some actual data on what users here do for backtesting.

I'll go first: I just finished the first working iteration of my own custom backtester in python, from scratch. It was super frustrating at times (a lot of the time), but I'm learning a ton. The feeling of complete control and transparency over how it works is also extremely satisfying.

Edit: obviously nobody is using Quantopian anymore, I meant if that's what you were using

View Poll

310

r/algotrading•

I've been thinking a lot again about overfitting after reading this post from a few days ago where the OP talked about the parameterless design of their strategy. Just want to get my thoughts out there.

I've been down the path of optimization through the sheer brute force of testing massive amounts of parameter combinations in parallel and picking the best parameter combo, only to find out in later on that the strategy is actually worthless. It's still a bit of a struggle, and it's not fun.

I'd like to try to make an illustrative example of what overfitting is. Gonna keep it real simple here

19428

r/options•

EDIT: functionality has been extended to run as a GUI in a web browser. This is great because now any plots that have been generated in a session will persist. Makes it easier to qualitatively compare different tickers, or see how one ticker evolves through time. Pretty cool stuff. I added a screen capture of it to the linked examples down below.

I've always thought there's gotta be a better way to 'see' what's going on in the option chain than just scrolling through a wall of numbers, so I wrote a python script that plots option chain informati

651131

r/statistics•

I've recently become interested in time series analysis, and I think I understand the basics of how autoregressive/moving average models work. I'm probably getting ahead of myself, but I've found myself wondering about how one could predict n steps ahead rather than just one. From what I've found so far, one can:

  • develop a separate model for each of the n steps
  • recursively apply a model to its own predictions
  • develop a model that is actually capable of producing the entire series of the n steps

I am curious about the mechanics of how the first method would be implemented. When making a model for each of the n steps, is each model applied to the same data sampled at different

16

r/algotrading•

Lately I've been really thinking about the way Marcos Lopez de Prado (Advances in Financial Machine Learning) goes into detail on something as (seemingly) simple and fundamental as considering what kind of data to even use in the first place.

So my question is: how many of you actually keep a database of tick data and build your own bars (time based or not) for research/testing?

My naive impression is that seems like the sky is the limit when doing this.

  • by default you have many more observations that would increase the chance of finding statistically significant signals
    • conversely this also means there is a lot more noise which could lead to false discoveries
  • you can resample
77

r/learnpython•

Background:

I have a function that is essentially a very large for-loop. Inside each iteration of the loop there are several calls to jitted functions, some of which are calling other jitted functions (with numba). The performance boost has been amazing with numba, but I want to take advantage of multiprocessing to get that last bit of speed.

I am using pool.map to parallelize. It works as expected and yields the same results as the for-loop style, so I think I am implementing it correctly.

Here is what's confusing to me:

I would expect that since I have 8 cores, turning this loop into a pool.map would produce roughly an 8x speedup. In reality I'm only getting a 40-50% speedup

210

r/options•

I would like to rant.

  • This is what r/wallstreetbets is for
  • It would be nice to see a thesis besides 'I thought xyz stock/etf was going up/down, so I bought calls/puts'
  • Given the above bullet point, congrats on your winning lottery tickets
  • It helps absolutely nobody with anything, and provides no substance to this sub whatsoever
  • The only people who think you are cool are people who have no idea what they are doing
  • These people then start asking noob questions that should be contained in the Noob Safe Haven Weekly thread
  • Most of all, you're just creating useless noise

I realize that me posting this also provides no substance and can s

345116

r/algotrading•

Currently I have a function that takes the arguments: (ticker, start_date, end_date), and looks to see if I have a .csv file of that ticker's data on my pc. Right now I'm only dealing with OHLC but I do plan on incorporating other types of data like fundamental or other.

Function:

If I don't have a .csv file of that ticker in the folder where my data is stored:

Pull that ticker's data in the desired date range from the api and save a .csv

If I do have a .csv:

Read in the file and check to see if the desired date range exists

If the date range doesn't exist:

Pull that ticker's data in the desired

613

r/AskProgramming•

The only formal background I have in programming is a couple of courses on algorithms I took in school, and the focus was more on solving crazy equations with matlab rather than properly learning how code should be structured.

Anyway, I've been out of school for a bit and know several languages well enough to solve specific problems I might have, which are mostly based on solving equations, analyzing data, or maybe something like writing a batch script. My skills have definitely been improving over time (thanks stackoverflow) but I seem to keep hitting a frustrating bottleneck: when I need to go back and work on code I've already written, and it's sufficiently complex, it usually takes *f

110

r/algotrading•

The historical market prices we all have access to are the outputs of some random process with an unknown, very large number of inputs. If one knew what this process was, then they would have significantly better predictive capabilities.

Going several steps further, I think it's not really a random process at all, but treating it like one is the only practical way to describe it. It seems similar to the idea that if one knew the exact position and velocity of every quantum particle in the universe, they would be able know the past and future. Theoretically possible, but practically impossible.

The point: if you have the knowledge of simple fundamental quantities, and how they are relate

814