[HN Gopher] FinRL: The first open-source project for financial r...
       ___________________________________________________________________
        
       FinRL: The first open-source project for financial reinforcement
       learning
        
       Author : ghgr
       Score  : 86 points
       Date   : 2022-03-27 11:28 UTC (11 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | t_mann wrote:
       | I really can't help but wonder - say I want to create a trading
       | strategy that I actually want to use. Is there really any point
       | in learning an open source framework, where I can assume that the
       | most profitable strategies it can produce are already being used
       | by someone? I think I'd rather start by learning the underlying
       | frameworks like TensorFlow, that this one seems to wrap, and
       | produce something that has at least a minimal chance of being
       | somewhat original.
       | 
       | That being said, I have more fundamental doubts that as a private
       | individual, with only off-the-shelf hardware, one could produce
       | any meaningful signals with DL that actually beat the market.
        
       | nautilus12 wrote:
       | This is self defeating if you open source an approach like this
       | and it is effective, then the laws of arbitrage says that the
       | market will remove any additional benefits of using it.
        
         | hungryforcodes wrote:
         | It would have to be the DOMINANT approach for that to happen.
        
           | [deleted]
        
         | vageli wrote:
         | > This is self defeating if you open source an approach like
         | this and it is effective, then the laws of arbitrage says that
         | the market will remove any additional benefits of using it.
         | 
         | This assumes perfect information. The effects of law of
         | arbitrage are not instantaneous.
        
         | [deleted]
        
       | Stampo00 wrote:
       | Based on the name, I was hoping it was a roguelike.
        
       | Galanwe wrote:
       | As someone with 10+ years of exp in the industry, I had no clue
       | what this was actually doing after reading the github page. Had
       | to dive through the examples and videos.
       | 
       | The alphas showcased seem weak: 1.5 max gross SR in sample,
       | unresidualized, unconstrained and standalone.
       | 
       | That would need to be blended with a hundred un correlated others
       | to have a decent portfolio.
        
         | torbTurret wrote:
         | Quants: So much fancy vocabulary just to consistently
         | underperform your favorite mutual index fund :)
        
         | nuclearnice1 wrote:
         | What does unresidualized mean?
         | 
         | What do the need to do to the software to "residualize" it? If
         | that's even the right expression.
        
           | Galanwe wrote:
           | It means to remove a set of factors from the signal - or the
           | returns of the signal, which would impact its performance or
           | exposure, and are not meant to be captured by the signal.
           | 
           | Imagine a "I have no preference" signal which gives a weight
           | of 1/n to each asset of the portfolio - you have 100 stocks
           | in your basket, you give 1% to each. If you would compute its
           | performance, you would see that this portfolio would roughly
           | make 10% average returns over 20 years. That seems good
           | right?
           | 
           | Well no it's not, because these 10% don't come from anything
           | meaningful that your signal did. It came because you gained
           | exposure to the market, and that exposure "carried" your
           | signal performance.
           | 
           | > What do the need to do to the software to "residualize" it?
           | 
           | Well residualizing overall just means that you want to
           | regress your signals on a set of factors that would carry its
           | performance for no justified reason. In practical terms, you
           | could start by doing a linear regression of your signal
           | against such factors (say beta, country, sector) and only
           | keeping the remaining residuals (alpha).
        
             | artemonster wrote:
             | Can you recommend books on the topic to learn about this
             | kind of stuff?
        
               | harveynick wrote:
               | https://www.amazon.co.uk/Quantitative-Equity-Portfolio-
               | Manag...
               | 
               | Caveat: it's not exactly "easy reading", and you might
               | want to have the "three blue one brown" YouTube channel
               | on standby.
        
               | artemonster wrote:
               | Watched every video of them, I am okay with math. Thank
               | you very much! Btw, since quant industry is full of
               | secrets - is there any source on some actual money
               | figures - how much firms make, what are the sums that are
               | required to be shuffled, what are the frequencies of
               | trades, profitability figures? Anything to get a slight
               | glimpse into inner workings of this. Unfortunately
               | googling turns out nothing or scams
        
               | l337 wrote:
               | Hedge funds are a very diverse group: from small shops
               | managing tens of millions to the large funds managing
               | tens of billions.
               | 
               | The very good ones probably make around 20% a year
               | (meaning that they earn around $40M per year per $1B
               | that's under management).
               | 
               | HFT companies are a different story. The biggest ones
               | make around $1B/year (e.g Virtu, Flow Traders which are
               | public), with a few of them even bigger.
               | 
               | There are many tier two companies making tens - few
               | hundred million dollars per year.
               | 
               | So none of them are really big (compared, to say, a big
               | bank), but they do make a lot of money per employee, and
               | the salaries reflect that.
        
           | caffeine wrote:
           | It comes from the "residual" of a linear regression.
           | 
           | So you take some obvious variable like the market basket of
           | stocks, do a regression, and then do your machine learning on
           | the residuals.
           | 
           | The reason is that you don't get "credit" for doing whatever
           | the market did, you only get credit for doing even better.
        
         | igorkraw wrote:
         | What's the best way for someone doing and ML and optimisation
         | PhD to get into quant research/Trading? I've been playing with
         | paper trading, trying to use creative data sources to find
         | alpha and algotrading micro amounts of Cryptos for a while now
         | and am seriously considering doing this for my post PhD life if
         | I can't find a nice tenure track (a complication is that I do
         | not want to leave Switzerland until I have citizenship here, so
         | any advice or introductions would be very appreciated!)
        
           | melony wrote:
           | Get an internship at a reputable prop shop or hedge fund
           | (that specialize in quant finance). There are plenty in
           | Switzerland.
        
             | bravura wrote:
             | Aren't they going to impose a strong non-compete agreement
             | on you, so that once you've actually learned something you
             | are handcuffed to them?
        
               | auntienomen wrote:
               | You can't really impose strong non competes on interns.
               | You don't show them the good stuff either. Just enough to
               | get/give an impression for later recruiting.
        
       | jasfi wrote:
       | I might be able to use these algorithms in my automated trading
       | system: https://tradecast.one. I'm not sure how well they
       | perform, but something to consider.
        
       | mumblemumble wrote:
       | Quick hot take: when the project has a Venmo QR code for
       | soliciting donations, you can safely assume they have not
       | actually figured out how to make lots of money on the securities
       | markets.
       | 
       | Which is not me looking to trash it. I'd just encourage people to
       | be aware of the context. This is an _academic_ project which has
       | apparently only been tested on hindcast data. Real life trading
       | may present challenges that were well outside their scope of
       | research.
        
         | nightski wrote:
         | I'd agree with the skepticism. That said, it takes a minimum of
         | 25k to get started using something like this in the real world
         | due to the PDT rule (honestly more than that so you don't dip
         | below 25k). It's possible they just aren't ready to throw that
         | kind of capital at it yet.
         | 
         | Also even if they aren't using real money that does not mean
         | they are limited to historical data. You can run algos on live
         | data even without actively trading. What you don't get is how
         | your actions affect the market itself.
        
           | [deleted]
        
           | charcircuit wrote:
           | Investopedia says that it only required when day trading on
           | margin.
           | 
           | https://www.investopedia.com/terms/p/patterndaytrader.asp
        
             | nightski wrote:
             | Cash settlements take several days. So while that is
             | correct, a margin account let's you use funds from the sale
             | of a stock immediately instead of waiting for the
             | settlement to occur. You aren't taking out any margin (with
             | interest) in this case, just using the funds you already
             | have (but haven't settled). Otherwise a cash account limits
             | how much you can trade very quickly since you are waiting
             | on trades to settle.
        
             | nickles wrote:
             | Equities settle T+2. Without a margin account, Reg T
             | requires that cash be tied up until a trade is settled.
             | It's not viable to day trade like that.
        
               | [deleted]
        
               | charcircuit wrote:
               | Doesn't the exchange match people with another person who
               | is buying / selling it? Every single cryptocurrency or
               | video game exchange I have used has settled pretty much
               | instantly.
               | 
               | How hard is decrementing the shares of one user and
               | incrementing the shares of another.
        
               | xxxtentachyon wrote:
               | You can settle as quickly as you want if you're engaged
               | directly with your counterparty. But yes, T+2 is wildly
               | outdated and will likely move to T+1 in the next few
               | years. Longer term, anything less than same-day
               | settlement both wastes capital (of BDs who need to post
               | collateral while their customers' trades wait to settle)
               | and risks contagion (since each additional day of
               | settlement gives a party more time to go bankrupt) IMO
        
               | v0idzer0 wrote:
               | > How hard is decrementing the shares of one user and
               | incrementing the shares of another.
               | 
               | whose database are you incrementing/decrementing in? Real
               | life stock trades happen across multiple exchanges with
               | multiple intermediaries (brokers, market makers, end
               | users). Without a blockchain, this is not trivial to
               | coordinate safely
        
               | nickles wrote:
               | > Doesn't the exchange match people with another person
               | who is buying / selling it? Every single cryptocurrency
               | or video game exchange I have used has settled pretty
               | much instantly.
               | 
               | There are multiple exchanges where stocks are traded, and
               | order routing is typically transparent when using retail
               | brokerages. The exchanges only provide the matching
               | engine, while brokers handle custody. The process of
               | transferring the ownership between brokerages is the
               | clearing step which is handled by the DTCC.
               | 
               | Cryptocurrency exchanges provide both the matching engine
               | and custody, so transferring ownership can be done
               | instantly by updating records in the exchange's database.
               | The clearing step occurs when transferring coins to
               | another wallet or exchange, when the transaction actually
               | hits the blockchain.
               | 
               | > How hard is decrementing the shares of one user and
               | incrementing the shares of another.
               | 
               | It's surprisingly difficult. Clearinghouses (centralized)
               | and blockchains (decentralized) exist to solve this very
               | problem.
        
           | pid-1 wrote:
           | > Also even if they aren't using real money that does not
           | mean they are limited to historical data. You can run algos
           | on live data even without actively trading. What you don't
           | get is how your actions affect the market itself.
           | 
           | That equals to useless toy software in my book. But it's just
           | my opinion.
           | 
           | Edit: Look, I don't want to trash the devs for no reason, but
           | the amount of "finance" academic stuff that claims to produce
           | successful strategies is just ridiculous. At some point
           | people just get tired.
        
             | nightski wrote:
             | You may well be right that it's a toy (and judging from
             | their docs it seems like it), but it's basically the first
             | step in using an algo for trading. You always test on live
             | market feeds first.
        
       | ausbah wrote:
       | smells like a solution in search of a problem
        
       | ghgr wrote:
       | I'm curious how efficient is RL for trading. Given that RL is
       | extremely data-hungry I'd say that this approach is likely to
       | result in an overfit model. Does anybody have positive
       | experiences with this?
        
         | [deleted]
        
       | Lapsa wrote:
       | ```Technical indicators: 'macd', 'boll_ub', 'boll_lb', 'rsi_30',
       | 'dx_30', 'close_30_sma', 'close_60_sma'.``` lulz
        
         | yeahwhatever10 wrote:
         | Why lulz? Bad indicators, too few?
        
           | ploika wrote:
           | Technical analysis (Bollinger bands and the like) would be
           | treated similarly to horoscopes by many people who know how
           | to work a Bloomberg terminal.
        
             | saeranv wrote:
             | I've never understood how someone had the nerve to
             | trademark "Bollinger bands", when all they are is just a
             | measure of 2 standard deviations from a rolling mean of
             | share price. It's like renaming 1+1=2 after yourself and
             | and trademarking it's use.
        
             | mellavora wrote:
             | So then why does Bloomberg build in so many technical
             | indicators into its product?
             | 
             | Look, I share your skepticism of technical analysis, but
             | there are many traders who do not. And when managing
             | traders, you might want to let them trade on TA because it
             | can give them a reason to take action. Otherwise they can
             | suffer from analysis paralysis.
        
       ___________________________________________________________________
       (page generated 2022-03-27 23:01 UTC)