<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="188984" data-post-id="188984">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="xlphs" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/xlphs/120/12168_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  xlphs
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had trouble with multiple time frames on tradingview’s pine script, and data munging was a pain (for python libraries) so I built myself a <em>simple</em> backtest engine too. It just reads ohlc from postgres and crunches the numbers, I ended up with a module with 1k+ lines of code…  The whole thing is slightly better than excel because other parts of my engine has code to pull data from oanda and push alerts to slack. Personally I think it’s unrealistic to rely on a trading bot, the best a bot can do is scan things for you based on some decision tree but that’s out of the scope of this discussion.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="188984" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-188984" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="188984"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="189022" data-post-id="189022">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="CinderellaMan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/CinderellaMan/120/24046_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  CinderellaMan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello everybody,</p>
<p><a class="mention" href="/u/rm-rf-etc" rel="nofollow">@rm-rf-etc</a> sorry for a late reply - I was away from a computer for a couple of days, but I’ve seen your message and have been thinking about it.</p>
<p>Regards abstractions and trying to squeeze in everything into a single system - partly I would agree that some things could be generalized for example “tick” prices/candles, etc for the display purposes - crypto, forex, stocks could just have price and time fields and that’s about it - so really simplified no generalized.</p>
<p>From everything that I’ve done over the years, I think the system needs to be really simple to succeed. People will build on top of it so it needs to be as simple as this is the data and you do whatever you want with it (write your strategy). In my course (which looks already much different than Igthorn: <a href="https://github.com/frathon/hedgehog/tree/video_07" class="inline-onebox" rel="noopener nofollow ugc">GitHub - Cinderella-Man/hedgehog at video_07 · GitHub</a> [at this moment at the 7th episode]) I took a PubSub approach. If you think about it - the only things that consumer needs to know is the data struct that will be broadcasted and the topic name. It works for anything that you want to stream - just prefix your stuff with type of what you stream. You would have topics like “stocks:AAPL”, “forex:GBPUSD”, “crypto:ADAUSDT” - nothing would interfere with each other. Then you write your specific consumers for crypto data, forex data, or stock data. There will be multiple consumers for single topic - one storing data to Postgres (or timescaleDB - or both[would guess that would be 2 consumers though!] as this could be beneficial as well!), one making some intermediate indicators and publishing them forward to topics like “forex:GBPUSD:ATR” or something like that. Obviously one of the consumers will be your strategy.</p>
<p>The above idea works perfectly with backtesting as you can just open the database (or a file) and publish everything to the topic and in the end, you will have a database with all orders, transactions and anything else that would happen.</p>
<p>I used Postgres as I don’t have any experience with timescaleDB. I would shy away from dropping too<br>
much tech if there’s no extremely good reason for it.</p>
<p>I know of one more trading project from <a class="mention" href="/u/rupurt" rel="nofollow">@rupurt</a> - <a href="https://github.com/fremantle-industries/workbench" class="inline-onebox" rel="noopener nofollow ugc">GitHub - fremantle-industries/workbench: From Idea to Execution - Manage your trading operation across a distributed cluster · GitHub</a><br>
I didn’t look into it but it’s also crypto-related and it looks like it’s more ‘abstracted’ away as it marketed as a workbench to create strategies on top of.</p>
<p>So in my opinion, it’s more the idea to embrace the common core that will just contain the project structure, possibly a frontend (so also it will need to contain common simplified structures), probably a bunch of behaviors that will dictate what is expected from each element of the system like “DataStreamer” - it needs to have “switchOn”, “switchOff” methods (that is just an example).</p>
<p>I would be interested in planning this out but I need to admit that I’m starting new work on Monday and also record my YouTube videos so I’m a little bit low on time. I need to give a good look at all of your projects (the ones that are shared on GitHub) and compare - I would love to brainstorm and come up with something as I can see that we are all doing similar things and wasting time by reinventing the wheel.</p>
<p>I wanted to keep this short… failed again - sorry</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189022" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-189022" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189022"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="189084" data-post-id="189084">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Welcome back <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20">. I can give a longer response later, gotta make this one brief.</p>
<p>TimescaleDB is a postgres extension / plugin / add-on, whatever it’s called, so you get all the goodness of ecto, but optimized for time series data.</p>
<p>Glad we’re all thinking generally the same way! This is exciting! And yes, I think we should get some documentation together to organize planning.</p>
<p><a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a> from our DM chat, here’s my first pass on pattern detection:<br>
<a href="https://github.com/rm-rf-etc/ohlc-pattern-detection" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/rm-rf-etc/ohlc-pattern-detection</a></p>
<p>The approach is to (1) extract the reversals from the chart (the maximum highs and lows forming a zig-zag through the chart), then (2) normalize the set, and finally (3) test the set with some rules. I’ve only gotten as far as steps 1 and 2. My thinking is based on the books by Thomas Bulkowsky and what I’ve read of his method on his website, as well as a Medium post which described something very similar.</p>
<p>Also, this approach assumes you will use <code>E.take/2</code> to grab your maximum size sample from your chart, and then you iterate over the reversals, continually dropping 1 off the beginning in each iteration, then normalize, and then test again. This way you will be scanning for a pattern of any length between your minimum and your maximum length.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189084" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-189084" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189084"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="189141" data-post-id="189141">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Anybody want to write an implementation of this one?<br>
<a href="https://towardsdatascience.com/detection-of-price-support-and-resistance-levels-in-python-baedc44c34c9?gi=530b2ea158f9" class="onebox" target="_blank" rel="noopener nofollow ugc">https://towardsdatascience.com/detection-of-price-support-and-resistance-levels-in-python-baedc44c34c9?gi=530b2ea158f9</a></p>
<p>I would change one thing about it though. I would calculate the support and resistance as areas.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189141" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-189141" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189141"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="189143" data-post-id="189143">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I could work on that one.  What data source are you using?  Is the data just formatted as a list with {high, low, open, close} for time intervals?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189143" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-189143" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189143"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="189146" data-post-id="189146">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sometimes I just read them from a chart in TradingView and type it out manually, which is slow. Other times, I’ll use Webull and some code I’ve written to pull from their API, which is entirely open, just not documented. Here’s an endpoint you can use:</p>
<p><a href="https://quoteapi.webullbroker.com/api/quote/tickerChartDatas/v5/913256135?timestamp=1557316800&amp;count=800&amp;type=d1" class="onebox" target="_blank" rel="noopener nofollow ugc">https://quoteapi.webullbroker.com/api/quote/tickerChartDatas/v5/913256135?timestamp=1557316800&amp;count=800&amp;type=d1</a></p>
<p>You’ll need to figure out the timestamp. I have some code to help with that but it’s not yet public. I will publish in when I get a chance. You’ll need to get the stock ID. Here are a few you could use:</p>
<p>MSFT: 913323997<br>
AAPL: 913256135<br>
TSLA: 913255598<br>
AMZN: 913256180<br>
NFLX: 913257027<br>
FB: 913303928</p>
<p>Each bar is a string, which you can parse with this function:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def parse_bar(str) when is_binary(str) do
    [ts, o, c, h, l, _ma, v, vwap] = String.split(str, ",") |&gt; Enum.take(8)

    %{
      t: if(not_null(ts), do: String.to_integer(ts)),
      o: if(not_null(o), do: String.to_float(o)),
      c: if(not_null(c), do: String.to_float(c)),
      h: if(not_null(h), do: String.to_float(h)),
      l: if(not_null(l), do: String.to_float(l)),
      v: if(not_null(v), do: String.to_integer(v)),
      vw: if(not_null(vwap), do: String.to_float(vwap))
    }
  end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189146" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-189146" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189146"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="189203" data-post-id="189203">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Take a look at what I wrote <a href="https://github.com/GunnarPDX/trade-indicators/blob/master/lib/sr.ex" rel="noopener nofollow ugc">here</a>. I wasn’t sure about the areas so I just used the shadow of the central candlestick as the area.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189203" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-189203" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189203"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="189439" data-post-id="189439">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks <a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a>, that was quick. Looking forward to testing it when I have some time (probably this weekend).</p>
<aside class="quote no-group quote-modified" data-username="CinderellaMan" data-post="12" data-topic="34002" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cinderellaman/48/24046_2.png" class="avatar"> CinderellaMan:</div>
<blockquote>
<p>From everything that I’ve done over the years, I think the system needs to be really simple to succeed. People will build on top of it so it needs to be as simple as this is the data and you do whatever you want with it (write your strategy). In my course (which looks already much different than Igthorn: <a href="https://github.com/frathon/hedgehog/tree/video_07" class="inline-onebox" rel="noopener nofollow ugc">GitHub - Cinderella-Man/hedgehog at video_07 · GitHub</a> [at this moment at the 7th episode]) I took a PubSub approach. If you think about it - the only things that consumer needs to know is the data struct that will be broadcasted and the topic name. It works for anything that you want to stream - just prefix your stuff with type of what you stream. You would have topics like “stocks:AAPL”, “forex:GBPUSD”, “crypto:ADAUSDT” - nothing would interfere with each other. Then you write your specific consumers for crypto data, forex data, or stock data. There will be multiple consumers for single topic - one storing data to Postgres (or timescaleDB - or both[would guess that would be 2 consumers though!] as this could be beneficial as well!), one making some intermediate indicators and publishing them forward to topics like “forex:GBPUSD:ATR” or something like that. Obviously one of the consumers will be your strategy.</p>
</blockquote>
</aside>
<p>I’ve been thinking about this quite a bit. I think this is the right idea. Although I’m not sure how I feel about the indicators going to topics. The way I’ve approached it is that I have a state struct that contains the OHLC price chart and the output from whatever indicators we want to use:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  %LiveTrade{
    charts: %{
      m1: %{
        max_list_length: 200,
        bars: [],
        macd: %Indicators.MACD{}
        rsi: %Indicators.RSI{}
        ... any others you want here ...
      },
      m5: %{
        max_list_length: 40,
        bars: [],
        macd: %Indicators.MACD{}
        rsi: %Indicators.RSI{}
        ... any others you want here ...
      }
    }
  }
</code></pre>
<p>So with this, the timeframe of the price chart is inherently the same for any of the indicators attached. <code>:charts</code> can contain any number of timeframes we want, as the module just loops over all the keys under <code>:charts</code>. So the whole system works as a state machine, the previous state is passed into the first function along with the new candlestick object, the function merges it into the chart, and then this state object is piped into each indicator function which then generates the updated indicator list and writes it to the state struct.</p>
<p>So I’m thinking about a few things from here.</p>
<ol>
<li>The chart <code>max_list_length</code> is used to keep the list from getting too large for memory, so the data then needs to be written to the DB, and I haven’t worked on that piece yet.</li>
<li>Sometimes some of the real-time data shows up after a delay (<a href="https://polygon.io/blog/aggregate-bar-delays/" rel="noopener nofollow ugc">https://polygon.io/blog/aggregate-bar-delays/</a>) and for some use cases, we want to update bars that have already been on the chart for a while. In this case, we would have to basically rollback to the part of the chart which is going to be modified, merge the delayed data in, and then iterate forward until we’re back to the latest OHLC packet. I haven’t worked on this problem yet either.</li>
<li>In the case of backtesting, we have to make sure we have all the necessary data in the DB before we start. In some cases, we may have parts of the data and gaps in between, so we would want to only download the data needed for filling the gaps, and then allow the backtest to run. So I’m thinking about how we might solve this with a PubSub approach. And I’m also thinking about how it would work if built on just <code>Stream</code> and <code>Task.async</code>. Perhaps the primitive would be <code>Stream</code> objects, and then the layer above could implement the PubSub parts.</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189439" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-189439" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189439"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="189980" data-post-id="189980">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think I want to drop use of timescaleDB. The following article advocates using SQLite:</p>
<blockquote>
<p>I use SQLite every time it is possible because it is extremely simple and easy to use and backup. Despite many people state that it is a <em>too basic</em> database it can handle huge large sets. Its major drawback is its lack of page or area locking — which leads to performance issues in applications that write a lot — . Other than that, it usually performs much better than expected, it is really lightweight and it has zero maintenance.</p>
</blockquote>
<p><a href="https://towardsdatascience.com/how-to-store-financial-market-data-for-backtesting-84b95fc016fc" class="onebox" target="_blank" rel="noopener nofollow ugc">https://towardsdatascience.com/how-to-store-financial-market-data-for-backtesting-84b95fc016fc</a></p>
<p>Since handling market data will be light on updates and heavy on reads, this idea seems reasonable to me. But, I’m not a data engineer, so if anybody here is able to lend some wisdom, I would <em>greatly</em> appreciate it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189980" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-189980" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189980"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="189981" data-post-id="189981">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LostKobrakai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LostKobrakai/120/3072_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LostKobrakai
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="rm-rf-etc" data-post="20" data-topic="34002">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/r/71e660/48.png" class="avatar"> rm-rf-etc:</div>
<blockquote>
<p>The following article advocates using SQLite:</p>
</blockquote>
</aside>
<aside class="quote no-group" data-username="rm-rf-etc" data-post="20" data-topic="34002">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/r/71e660/48.png" class="avatar"> rm-rf-etc:</div>
<blockquote>
<p>Since handling market data will be light on updates and heavy on reads</p>
</blockquote>
</aside>
<p>This might be interesting as well: <a href="https://duckdb.org/" rel="nofollow">https://duckdb.org/</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="189981" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-189981" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="189981"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/34002/load_more?page=3">Load more posts (17 remaining)</a>
</div></template></turbo-stream>