rm-rf-etc

rm-rf-etc

I have a private project which I’m thinking of making public, but I want to first see if there’s interest.

I think elixir is an excellent language for running automated trading strategies, and so I decided to build what I need from mostly scratch.

So far I have a state machine which tracks stock activity in whatever timeframe specified, and I have the code for the ATR, RSI, and MACD indicators. Each has been closely checked against the output from TradingView.

I’ve also written one strategy and done some semi-successful backtests but I’m still working to increase the quality of how backtests are conducted (to be more realistic).

I’m fine with keeping it private, but if others want to contribute I certainly wouldn’t mind the help.

First 10 of 37 Posts Switch mode

subhrashisdas

subhrashisdas

I am interested. I am learning this language to build personal stock trading platform.

PJUllrich

PJUllrich

Author of Building Table Views with Phoenix LiveView

I think that @CinderellaMan will also be interested :slight_smile:

CinderellaMan

CinderellaMan

@PJUllrich Indeed, I would be very interested - especially in those indicators - I would totally steal them :slight_smile:

@rm-rf-etc TLDR: Please release it, many people will benefit from it :slight_smile: but it’s hard work to get contributions.

On a more serious note, I released a cryptocurrency trading “environment” last year and I believe that some people are/were using it but you need tons of marketing, introduction materials and tutorials, and “stuff” to get people excited to the extent of contribution. At least for me, it didn’t work out this way (and I had similar hopes that people will contribute as they will be using it and we will make it better together).

I think there are multiple reasons for it:

  • some people just want to use a product (they don’t care about the code so much, Elixir makes it easier for them to modify it a bit and that’s it)
  • some people are overwhelmed by the scale of the project (they need more dev docs etc - do you have any of those?)
  • some people aren’t interested in the product, but they want to understand it for learning purposes - again you need even more dev docs

I would love to see more algo trading related stuff being released to the community as it would enforce the idea that this is what Elixir is good at, but it’s probably too early to expect people to contribute (it requires lots of non-coding related effort from you).

For me, to get people interested I gave up on docs etc - I started to record youtube videos and I can see people being interested far more than in “finished” code - maybe that’s the way to get people excited to do it - through videos develop system up to the level when people feel comfortable to contribute as they fully understand the design decision behind it.

I hope that this didn’t come across negative - I think we have a great Elixir community and chance here are much better to extend your project than in any other language.

WFransen

WFransen

First of all, thank you for all the effort and wonderful videos.

Personally I second creating video tutorials. Some people find it a lot easier to see things happening, than to read a part of a document/book.

This is just my opinion of course :slight_smile: but my students have similar opinions. (Or I’m just a really bad writer, that’s also possible)

rm-rf-etc

rm-rf-etc OP

Thanks for the replies everyone. @CinderellaMan, I don’t take it as negative. Just sounds realistic.

I’ll clean up a few things and post it here.

I haven’t added any docs yet, there’s just unit tests.

rm-rf-etc

rm-rf-etc OP

@subhrashisdas I haven’t added any sort of frontend yet, but I do want one eventually. I would probably build it as a client app so it could run independently. And I’ll probably use Scenic for that (it seems amazing).

rm-rf-etc

rm-rf-etc OP

Here’s just the indicators.
https://github.com/rm-rf-etc/trade-indicators

Please feel free to provide suggestions for improvements/changes/etc. I’m still fairly green with Elixir.

I also have code for downloading data from Webull and Alpaca/Polygon, and I hope to eventually have everything needed for backtesting, forward testing, scanning, live trading, and driving a client frontend. Those parts are still half-baked at the moment.

Right now I’m working on a module to do pattern detection based on reversal points.

GunnarPDX

GunnarPDX

I’m working on something similar right now, it’s a portfolio analytics app which offers backtesting for custom investment portfolios against 20yrs historical data. I could definitely help you out with the backtesting and frontend work if you made it opensource.

rm-rf-etc

rm-rf-etc OP

Hi @GunnarPDX. Great! I will. Do you have anything public yet I could review?

@CinderellaMan I was looking at igthorn just now. Seems like there’s a good amount of overlap of objectives between my project, your project, and GunnarPDX’s project. If we built a common core, we could probably all collaborate to help us each other realize our individual projects faster.

For my project, I’m not focused on crypto, but I’m also not opposed to it. I’d propose a common core being an engine for ingesting and streaming back OHLC data to support any variety of real-time use, whether that’s a trading platform GUI or a trading bot. The engine would have an API so any variety of client could be built for it. I’m planning on using an approach like this anyway since I’d like to run a client app on a separate machine using scenic. So for my project, the core would be running in a bot on a server, and the client would connect remotely from my laptop. The client would also support multiple connections so I could manage multiple bots.

I imagine the engine would have a state struct for everything that’s in memory, and for the purpose of either rendering a longer term chart, or for performing backtesting, we would stream from the DB… I could actually use some help on this, I don’t have a lot of experience in the area of managing large time series datasets. I’ve been using timescaleDB BTW.

For supporting crypto, forex, stocks, commodities, what have you, that would all be built as abstractions… somehow :slight_smile:

Well that’s my proposal anyway. Let me know if that would align with your approach. Thanks.

GunnarPDX

GunnarPDX

Just sent you a PM with some stuff to check out. It sounds like I may have ran into similar issues with the time-series data, I just used Postgres and managed to make things work pretty well, though TimescaleDB should make things easier by the looks of it. Let me know what you think, I’d love to contribute.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement