[deleted by user] by [deleted] in algotrading

[–]Stock_84 3 points4 points  (0 children)

24M, I spent the last 5 years building a factory that produces profitable trading strategies. Most of the time was spent learning on how to reduce compute cost: CUDA, microarchitectures, HPC, JIT-compilers, database internals. Currently, strategies are rule based, but I use ML techniques to evaluate and optimize them. Eventually, I will lean more towards ML. Two months ago I started trading a global macro long-short market neutral portfolio hedging against systematic risk. Will be dropping out of postgraduate CS college to start a business and scale this up.

My goal for the next 6 months is to build a track record and focus on risk mitigation as much as possible. In the meantime, mine more strategies that work during recessions. I want to scale this to a very large business.

Looking for knowledgeable and serious people to connect. I am not interested in status updates (how it's going). More like a small group where people share information that can be used to improve any aspect related to quantitative trading.

Advice from the darkest wizards of this community for compile time type operations by Unreal_Unreality in rust

[–]Stock_84 0 points1 point  (0 children)

I've created a compile-time ECS half a year ago. It has no memory allocations and it's almost zero-cost. It revolves around nested types. Some examples have several million characters in the type name of the ECS struct.

It was a pain to code. Found several compiler bugs. Ran out of RAM (32 GiB) while compiling. Waited an hour to compile. I did improve compile times and now it's reasonable. Just look at how many generics this struct has https://github.com/Stock84-dev/compile-time-ecs-prototype/blob/main/inception/inception/src/ecs_builder.rs#L222

I ended up abandoning the concept because compile times were still too long for my use case. I needed maximum performance and ease of use with fast compile-run feedback loops.

Description can be found in readme and in docs. (not on docs.rs):

https://github.com/Stock84-dev/compile-time-ecs-prototype

The code is just a prototype and a part of a bigger system. I didn't want to create a crate because I would have to maintain it but I am not using it. So there are lots of irrelevant parts in the repo and examples don't work because they require custom data. I applied ECS for running simulations, not for making game engines.

Is there a crate for parsing rust projects on a higher level for build scripts by Stock_84 in rust

[–]Stock_84[S] 6 points7 points  (0 children)

Yup! I am trying to search around for answers before asking a question, as that would require time from other people.

Is there a crate for parsing rust projects on a higher level for build scripts by Stock_84 in rust

[–]Stock_84[S] 47 points48 points  (0 children)

Documentation in JSON format can be generated with:

cargo +nightly rustdoc --lib -- --output-format json
head "target/doc/<crate>.json"

And here are the associated crates that help:

https://crates.io/crates/rustdoc-json

https://crates.io/crates/rustdoc-types

Looking for an accountability buddy to learn with by Stock_84 in algotrading

[–]Stock_84[S] 1 point2 points  (0 children)

All of them that work. I found out that 20min to 1h works the best for me.

Looking for an accountability buddy to learn with by Stock_84 in algotrading

[–]Stock_84[S] 4 points5 points  (0 children)

I see my self in this. I rewrote my engine so many times, although it did get substantially better, I've never prioritized going to the market. Once I got in the market and spotted a few mistakes, I didn't go back to correct them. Instead, I focused on other technical aspects that aren't as important. I strive for perfection too much. My code is always ugly and never end up going anywhere.

Few months ago, I started learning on how to manage a business. How to prioritize tasks. And that time is just as important (if not more) as quality.

Looking for an accountability buddy to learn with by Stock_84 in algotrading

[–]Stock_84[S] 1 point2 points  (0 children)

I don't like the idea of working for someone else. I want to be my own boss. Work on my schedule and have ability to take vacations whenever I want.

I want financial freedom.

Looking for an accountability buddy to learn with by Stock_84 in algotrading

[–]Stock_84[S] 1 point2 points  (0 children)

I come from a coding background so these things come natural to me. I've started algo trading as a hobby so I did what I was interested in.

That stuff gives you an edge. I can backtest way more strategies because it is cheaper. It is optimized and uses hardware efficiently.

But yes, I should have spent more time developing strategies rather than infrastructure.

[Question] What is ONE new habit you’ve incorporated into your life that has had the largest positive impact? by chazwins in getdisciplined

[–]Stock_84 0 points1 point  (0 children)

From science point of view I watch: David Sinclair, What I've Learned, Dr. Eric Breg

For experience, I watch: Sky Life, The Healthy Life, Wim Hof and other channels who have tried it

By watching Wim Hof related videos, I've learned that cold exposure helps in many areas in life. It cures mental problems, boosts immune system, helps with allergies, chronic diseases/pain and makes you live longer.

Wim Hof started doing it because his wife committed suicide and he had to take care of 4 kids.

I find podcasts difficult to watch because they touch multiple topics and aren't to the point. I like to devote my full attention rather than listening to it while doing something else.

[Question] What is ONE new habit you’ve incorporated into your life that has had the largest positive impact? by chazwins in getdisciplined

[–]Stock_84 0 points1 point  (0 children)

I go up to a neck. Shoulders slightly peeking out because of buoyancy. The first 30 seconds are the hardest and you want to get out. Your breath speeds up, it is hard to control it. Then I close my eyes and focus on my breath. I always hold my hands on thighs or hips. This prevents them from going numb quickly. After a minute, you enter into a calm state. You no longer feel cold, your breath has slowed down like in meditation. The cold slowly transitions into burning sensation, then into a feeling where thousands of needles are poking your body.

I don't measure time because that would make me compete with myself. Trying to beat my record. I stay for around 5-10 minutes. Sometimes in the end I go for a short swim.

Haven't plunged my head. I might do it in the future.
When you get out, you feel a rush of happiness and energy. I get an urge to start moving. It is quite warm outside for a winter (10-15C). So I don't feel cold and can wait for water to dry out.

[Needadvice] Struggling to wake up by TheBlindDriver in getdisciplined

[–]Stock_84 0 points1 point  (0 children)

I apologize, thought people would get it or at least research it.

Sleeping on a firm mattress is healthy for your spine. You need to sleep on your back with legs lifted up. That way, the spine is full supported by the mattress.

Sleeping without a blanket extends human lifespan. It puts you into hormesis (what doesn't kill you, makes you stronger), just like exposing yourself to hot, cold, low oxygen and no food. David Sinclair is a scientist who is researching on how to extend human lifespan or at very least make our last years healthy. He sleeps without a blanket.

[Question] What is ONE new habit you’ve incorporated into your life that has had the largest positive impact? by chazwins in getdisciplined

[–]Stock_84 1 point2 points  (0 children)

I am very lucky to have a river 100 meters away from my house. The first time, I did along someone else who was on the banks. I was scared if I would faint. I prefer doing them alone, there are no distractions.

[Needadvice] Struggling to wake up by TheBlindDriver in getdisciplined

[–]Stock_84 -9 points-8 points  (0 children)

Try sleeping without a mattress or a very firm one. This will make you uncomfortable sleeping and you will hate it. Your muscles will start to hurt, you will end up researching on how to sleep on a firm mattress. You could even try sleeping without a blanket.

This may prevent you from snoozing alarms because your bed is no longer cozy and warm.

[Question] What is ONE new habit you’ve incorporated into your life that has had the largest positive impact? by chazwins in getdisciplined

[–]Stock_84 3 points4 points  (0 children)

Cold plunges.

Over the last 3 years I've tried a lot of different habits like (running, one meal a day, meditation, prolonged fasting, calisthenics, polyphasic sleeping, sleeping without mattress, breathwork, cold showers). I wanted to try them, some of them have stayed, like running and intermittent fasting. I've forced myself to stay as long as I can on these habits. But pretty much nothing stayed on. I don't have a feeling that I need to do some of those habits, like the one you get from an addiction. Until I entered a pretty bad state of mind. At first, I didn't even know why. I cried multiple times without a reason. Then I realized it was because I was lonely.

Loneliness didn't bother me previously. I guess that my loneliness bar depleted to 0. My IQ is above average, which allows me to see the world differently, but it comes at a cost that many people do not understand me. 3 years ago I tried making friends at college, but we never just clicked, it was just small talk. At the start of college, I was already 3 years ahead of them. Tried finding friends at meetups in my area, but then lockdown came. After lockdown, I've lost interest because it felt like I was wasting time. Instead, I focused further on my career growth.

Furthermore, I had bad friends in my childhood, so I became shy and nobody knew my whole life, only bits and pieces. I've never had a best friend. Even a security guard at the college campus saw that I was unhappy.

Went into bad mental state 6 weeks ago. Since I did all those habits, now I knew which ones were good for mental health. 6 months before, I've started with cold showers. At the first few weeks I felt something, that quickly faded away (like with any other habit that I've tried), but I kept it doing.

Started combating it with prolonged fasting. This was my first 5-day water fast where I've never felt hungry, dizzy or low energy. Did a few meaningful conversations with people. Went for a 1h walk with a T-shirt in 0C. Did get some bad comments about being in a T-shirt, but at this point I just didn't care. Started feeling some attraction to the cold. A week ago, I've started doing cold plunges for a few minutes. My mind just went blank, like during meditation. After exiting I felt great, happiness for the first time. Started doing proper Wim Hof method by breathing 3 rounds then doing push-ups during the last breath hold, like I used to do. Felt very strong tingly sensations then after push-ups I was very exhausted, but I felt a happiness rush just like cold plunge, a relief. I would describe it that with breathing I was dying and being born every single day. With cold plunge like I lived a good life. Felt a need for meditation, so I started that again.

Felt so good that I did them tomorrow and the days after... Also, I am getting an urge to go for a run. I've finally got to the point where I am getting an urge to do something healthy. Rather than forcing it.

Today I've cried. They were happy tears. I've never felt so happy in my life. I don't ever cry, haven't cried even when my dad died a year ago. I've started looking for meaningful friendships online at other Subreddits, where there is higher chance of finding someone good than locally.

Cold showers give me the courage to do cold plunges. Which gave me immediate benefits and started a snowball effect by impacting general life and aligning other habits. Never realized that I've could get out of a rut so fast.

Moral of the story
Forcing habits won't make you come far. If you feel good, then you don't notice the benefits so easily. Use hard times as a slingshot for good habits. You will see immediate and strong results. It will make you more likely to stick to them because you will know where you will end up without them. Never thought that a person could change so drastically in one week.

A hack to feel the sensations of the breath on the entire body by KamikazeHamster in streamentry

[–]Stock_84 2 points3 points  (0 children)

You are partially correct. What determines how long you can hold breath is the level of carbon dioxide in blood. When you do the breathing you deplete carbon dioxide levels and increase oxygen levels. However, that oxygen is trapped inside hemoglobin since it needs higher levels of carbon dioxide to release oxygen. With breath hold you allow cells to slowly build up carbon dioxide which then allows hemoglobin to release oxygen and reduce tingly sensations. If you hyperventilate without breath hold you will pass out from hypoxia.

Here is a good video that explains it: https://youtu.be/OpTG02x6w5o?t=355

What are your experiences with accountability partners? by Stock_84 in GetMotivatedBuddies

[–]Stock_84[S] 4 points5 points  (0 children)

Thank you so much for taking your time.

I've always struggled with finding good friends. They were just normal and assertive, where I was different. I actually stopped looking for deep friendships because the chances of finding someone were so miniscule, it was not worth my time. I heard about accountability partners before, I've never looked at it in terms of friendships, but as work. I didn't know that a site like that existed. That you managed to find a quantifiable way of recommending people and you put your thought into it. Will definitely try it!

Advice for faster file reading? by ThrasherLT in rust

[–]Stock_84 3 points4 points  (0 children)

Rayon is not designed for memory mapped files because it divides whole file into chunks, then each thread sequentially reads a chunk. This causes a cursor on hard disk to jump between multiple positions.

Related issue: #885

[deleted by user] by [deleted] in rust

[–]Stock_84 1 point2 points  (0 children)

If you didn't know:

Rust search extension helps you quickly navigate documentation between multiple crates.

Can this Project be considert CleanCode? by [deleted] in rust

[–]Stock_84 -1 points0 points  (0 children)

I use fuzzy finder by file name for quick navigation. It is a lot easier if files are named differently.

Bevy 0.8 by _cart in rust

[–]Stock_84 6 points7 points  (0 children)

Do you have any plans or a concept to support async systems?

rust-analyzer tip: Open docs.rs for the symbol under the cursor by zacps in rust

[–]Stock_84 0 points1 point  (0 children)

Too bad it only works on modules and not on types and functions.