Ask HN: Automate Stock Trading? - <AUTHOR> I'm building an automated stock trading system for my personal investments. The plan is for the trades to be based on data ingested through past stock performance, current trend, fundamental analysis, performance compared to similar stocks, and other data sources added incrementally.
There is a learning curve in which I'm developing the initial algorithms that will help gain an advantage over simplistic human investing with the computer providing a more deterministic risk-reward management system that it will apply. Once this has been achieved, the goal would be to increase the ROI and maximize the final take-home profit (minimize tax where possible to increase effective ROI). I'm validating algorithms with a back testing approach, currently obtaining data from Quandl.
I'm planning to host this on AWS and use a combination of Python and R. I haven't decided on the datastore yet, but I'm open to suggestions.
Does HN have any suggestions or any tips from someone who has attempted to do something like this in the past, if so, please also briefly describe your past experience and current position with the project?
Thanks! <comment><USER3> This is a bad idea.

The "simplistic human investing" you're talking about probably accounts for 0.01% of trades. The vast majority of trading these days is algorithmic, and the HFT guys will eat you for lunch.

What you won't see in back testing is how the market reacts to your strategy. The market isn't something that stays static: your activity changes things in subtle ways, and I guarantee there are people smarter than you who have designed algorithms to detect and exploit trading strategies such as yours.

Algo trading is very dangerous if you're not coming from an investment finance background. Just be very careful.

<comment><USER4> I agree with the fact that it's very unlikely that I can develop a mechanical system that would beat algorithmic trading. The good news is that I don't have to. That's why I'm a discretionary swing trader. In my personal case, trading is about learning how to fish. Learning a non computer skill that I can use for the rest of my life.

Even if it sounds cruel. With enough time and hard work, you can train yourself to detect the pigs getting slaughtered by the professional traders and take a bite of the action. That's what swing trading is all about.

That being said, it's far from easy. It requires a lot of hard work and determination. Reading books is a good start. The book "Trading Your Way to Financial Freedom" by Dr. Van K. Tharp is required for any modern day trader. The most important lesson from the book is probably that you have to always go into a trade knowing how much you are willing to loose on that trade. Using a stop and respecting it should be deeply engraved into your DNA.

But reading books is not enough. Getting a proper trading education is important. The average trading course will cost you anywhere from $2,000 to $5,000. With so many get-rich-quick schemes on the Internet is hard to find a serious an respected trading education program. They are out there. A good place to start would be Trader Planet. They have a list of the Top Trading Schools.

Why pay so much for a trading course? Because in the long term it will save you time and money. In the book "How I made $2,000,000 in the Stock Market" by Nicolas Darvas. The author spent many years of failure paying tuition to the markets until he found his way. Many people read this book and get fascinated by the big number. The fascinating part about the book is that in the 1940s and 1950s this guy created his own form of pseudo technical analysis. That system is what made him the $2,000,000. He spent a lot of time an money developing the system and eventually worked out for him. Keep in mind that Moving Averages started to get used in trading in the 1960s (If I'm not mistaken).

The moral of the story is that spending $2,000 or $3,000 in advance for a proper trading education will save you a lot of time and money.

People with little or no trading experience should not be developing mechanical systems and use them to risk real money. Wanna do it for educational purposes, sure go ahead, but don't risk any money. That shouldn't stop you from diving into the markets though. Once the market bug bites you there's no turning back. You just have to do it the old fashion way. In my case, by reading charts. As a software developer I think technical analysis is the only way to study the markets because that's how my brain is wired.

<comment><USER3> I'll put it this way: I went to a top business school (which cost a lot more than $3000), and my finance professors were former traders, federal reserve governors, investment bankers, algo traders, etc. Without exception, they recommended a buy and hold strategy for non-institutional investors. Buy companies you believe in (or better yet, index funds), and hold them until you need the money. And this was in classes where they were teaching us investment strategies! The game is rigged against you; as an individual investor your information will always be 3-5 seconds out of date, and your trades will get thrown in the back of the queue behind the institutional investors. Any strategy that relies on market timing is doomed before you even start.

Professional traders (hedge funds, etc) can get away with risky strategies because they're balancing risk. For every insanely risky, 30x leveraged trade they make, they also hold metric fuck tons of US treasuries. You also never invest in one hedge fund; you invest in 30 or 40 hedge funds because most will lose money. The guys running the funds make their money off of fees because the return of the funds is usually based on economic factors more than 'alpha'.

Trading has changed a lot since the 40s and 50s. Modern finance wasn't really invented until the 80s as the relationship between debt and equity became much more fluid. If you really want a proper investment education, I would suggest a real education in the form of a computational finance degree as offered by many of the top quant business schools (CMU, MIT, etc.) There you can learn about the leveraged trading strategies that HFTs and algo traders use, why they work, and how to exploit them.

The big traders have a word for individuals who try to beat the market: suckers. There is no arbitrage, and even when there is, someone else will beat you to it because your access to the market is inferior to theirs. It's fundamentally unfair, but it's what happens when you have a revolving door between the federal reserve, the SEC and the top investment banks. You're playing a game with asymmetric information from the losing position against very skilled players. If you beat them, it's dumb luck. You're not going to be able to do it consistently.

The guys hosting seminars on investment strategy have found a way to consistently make money: by hosting seminars on investment strategy and charging $3000 to $5000 to attendees. If they had a truly ironclad way to make money consistently in the market, they wouldn't need the money from the seminars because they would be pulling in tens/hundreds of millions a year running a hedge fund or prop trading group.

</comment></comment></comment><comment><USER5> I once set down this path but stopped.

Your big problem is that the future market doesn't look like the past market. There is a statistical error inherent in excessively curve fitting past data. You could develop a system which says you'll return 25% per year and then lose 100% in he he first six months. So don't fall into that trap of excessively back testing.

What you should be spending time is your money allocation algorithms - <USER2> very same set of trades can return high amounts or wipe you out depending on what % of your trading equity you allocate. This is something you can test - by simulating actual trading returns - both upside and downside.

I'm not sure if you're looking for trading advice or development advice, but I woudo recommend these books while you are doing system development:

\- [http://www.amazon.com/Trade-Your-Way-Financial- Freedom/dp/00...](http://www.amazon.com/Trade-Your-Way-Financial- Freedom/dp/0070647623/ref=asap_bc?ie=UTF8) \- trade your way to financial freedom by Van Tharp

\- the entire 'market wizards' series ([http://www.amazon.com/Market-Wizards- Jack-D-Schwager/dp/0887...](http://www.amazon.com/Market-Wizards-Jack-D- Schwager/dp/0887306101)) - there are three (or four?) books in the series, all are worth reading.

The final problem is designing a system which you truly understand, which you are sure gives you an edge. And which you are willing to stick with if there are periods of high drawdowns.

Also remember you are up against people with very deep pockets and huge computers and phd guys working on there same thing.

It's a great intellectual puzzle and a worthy challenge, but make sure you know what you are getting into.

<comment><AUTHOR> Thanks for the advice. I will definitely err on the side of caution and not get caught up with the backtesting and over fitting. Allocating resources (funds) will probably play an important role to manage risk in the system.

At the end of the day, I'm trying to answer the question: can you make money in the stock market with a low-touch (eventually no-touch) approach with the help of advanced software and analytics. Hopefully the answer is yes ;-)

<comment><USER6> >> At the end of the day, I'm trying to answer the question: can you make money in the stock market with a low-touch (eventually no-touch) approach with the help of advanced software and analytics

The answer to this has been a resounding "hell yes" for decades across IB/HFT/AlgoTrading shops. The only thing this exercise achieves is whether "you" personally can make money with a low-touch approach using software.

<comment><USER7> I don't know if you've ever worked in a HFT shop but I am pretty sure those guys aren't just goofing off while the robots print money for them.

<comment><USER6> Well, they're usually revising/improving their models while the robots print money today to ensure that the robots can print more money tomorrow. The frequency and depth of the human input varies based on the kind of strategies employed (macro/statistical arbitrage etc). Moreover, successful models take competitors' potential models into account which (like everything else) is a moving target.

</comment></comment></comment></comment></comment><comment><USER8> If I could just give you one piece of advice it would be this: don't do this.

A bit longer: You're a pig headed for the slaughterhouse. Please do it 'for play money' only for the first 5 years or so, if your method makes money over that period then set yourself a goal and if you reach it _stop_.

<comment><AUTHOR> If you could please shed some light as to why you hold that opinion (past experience etc.), it would be of great help!

<comment><USER9> Beating a stock market index is a zero-sum game, and the large players in this market have hundreds of millions of dollars and huge manpower invested in making money of small players like OP. I suppose it's possible in principle to be smarter than them, but that's the bar.

<comment><USER10> It's zero-sum over the short term, but not over the long term -- "beating the index" is (kinda sorta) another way of saying "dragging the index towards efficiency." It means investing in stocks that are going to perform, which (kinda sorta) like investing in companies that will be successful, which increases the size of the pie.

Of course, with the amount of money the OP is likely to be investing, it's completely sensible to ignore market impact.

</comment></comment></comment></comment><comment><USER11> "A mathematician plays the stockmarket" is an interesting read of a smart person who made a bunch of mistakes and lost money.

[http://www.amazon.com/gp/aw/d/0465054811/ref=mp_s_a_1_sc_1?q...](http://www.amazon.com/gp/aw/d/0465054811/ref=mp_s_a_1_sc_1?qid=1424599137&sr=8-1-spell&pi=AC_SX110_SY165_QL70&keywords=mathematician+plays+stockmarket)

<comment><AUTHOR> I haven't read the book. From the description on Amazon it seems the investor/mathematician let his emotions come in the way of his investment decisions which led to him losing money. I think that's a risk we run by providing that human touch, which sometimes may even help us if the software is making stupid decisions. My goal is to build a fully-automated system (no human interference) that makes "confident" decisions based on statistics and hard numbers.

<comment><USER12> Your automated system will require human input. I lost a bunch of money in Jan - I saw a huge drawdown, discovered a fixable flaw in my strategy, panicked and closed my positions. Human inputtime - do I close positions and shut down?

Had I stuck with the flawed strategy, I'd have made (a small amount of) money.

Dont think that you dont need to manage your psychology simply because you are running an algorithm.

<comment><AUTHOR> Yummyfajitas, that's exactly why I do not want human input. Also, I'm not trying to make money on every bet, but to make more money in my winning bets (less fees) than I lose in my losing bets.

<comment><USER12> What I'm trying to convey is that you do have human input even for a pure algo strategy. If you acknowledge it exists, attempt to minimize it and manage what remains, you are far less likely to have it cause you problems.

<comment><AUTHOR> That's fair enough. Total autonomy can be pursued, not necessarily achieved, so better to accommodate and minimize the imperfections

</comment></comment></comment></comment></comment></comment><comment><USER13> Just a word of caution: the profitability of stock trading, regardless of the timeframe (high-frequency, daytrade, week long positions), heavily depends on access to information. So even if you build a system that mathematically is better than those built by a team of physicists at large financial institutions, it may easily under-perform the market due to its limited access to data.

<comment><AUTHOR> Yes. That is a massive handicap that the system will have (it's not going to be co-located and probably won't have access to early information, etc). I'm wondering whether it's possible to develop a system that accommodates these deficiencies while still ending up on top.

</comment></comment><comment><USER14> Let's assume your strategies work, then you will earn by a magnitude more by doing this for a trading company than you will ever with your own funds.

You can go down that road, but this a whole full time career and it usually takes years to be good enough at it.

I could recommend this book ([http://www.amazon.com/Building-Algorithmic- Trading-Systems-W...](http://www.amazon.com/Building-Algorithmic-Trading- Systems-Website/dp/1118778987)) to get an understanding for the craft.

</comment><comment><USER15> I used to do it with bitcoin, but not to get rich, just for curiosity.

The most algorithms is just chart reading, playing around with periods, standard deviations etc. You can achieve something really quickly, but it only works if the market jumps up and down within a short time period and stays on the same level if watching a bigger time frame. What if the market drops by 90% suddenly because some bank decided to do something stupid?

The next time I won't work on HFT, but more of risk reduction and long-term investments: \- Markowitz diversification model \- Multi-Market trading, trade on market differences

Another interesting approach would be to exploit trading algorithms, since 99.9% of all trades are algo trades.

What you theoretically could do is use popular trading algorithms, develop a tool to monitor their decisions, adjust decisions weights and see how a simulated market performs on comparion to the real market. Now that you have something like a "slave" market and can go on to the next step and calculate scenarios e.g. 5min ahead and can 99.9% predict where the market will be in 5min.

<comment><USER16> > Now that you have something like a "slave" market and can go on to the next > step and calculate scenarios e.g. 5min ahead and can 99.9% predict where the > market will be in 5min.

What most algorithmic trading models that are looking to prey on other algos do is either wait until their model says the market is already in some bad decision state or move the market in some way to make the bad decision state more likely.

</comment></comment><comment><USER17> I wrote a somewhat long-winded comment on this topic a while back, you may find it useful:

[https://news.ycombinator.com/item?id=6832589](https://news.ycombinator.com/item?id=6832589)

The _tl;dr_ version of it is:

Risk management, specifically position sizing, is commonly neglected and yet extremely important.

Psychology is everything, regardless of whatever your approach may be.

</comment><comment><USER16> You have not given nearly enough information to give any reliable tips.

Start with a few questions. How often are you targeting trades? Do you anticipate trading thousands of times per day, a few times per day, a few times per week, a few times per month or a few times per year? Know that there are sophisticated algorithmic trading systems in all of those spaces.

Once you know how often you will be trading, you can make more appropriate decisions about execution platforms. What kind of data feeds do you want to use? How will you get the data into your systems, how will you get the outputs out of your system. How will you translate those outputs into orders? Who will take your orders? As an aside, most brokerages will want to know if a computer is making all the trades and will either outright ban fully automated trading or will want a kill switch (see the TSA for your broker of choice).

This leads us to the actual hardest part about automatic trading, operational risk. What are you going to do to prevent your system from making out trades? What is your shut down procedure? How is it triggered? How will you monitor the system? Know that managing automation risk is the last mile of human intervention in the system, and that lots of people have lost a lot of money by not intervening soon enough, or intervening too soon.

You also need to have a target benchmark to compare to. What are you going to benchmark against? How often are you going to evaluate against that benchmark? How long will you allow your system to underperform the benchmark? There are long game algorithmic trading systems that have built into their capital allocation models >10 year underperformance against benchmarks for instance.

Finally, ask yourself, what inefficiency are you taking advantage of, that will allow you to profit from trading? What is it that you bring to the table that isn't already there? Once you honestly assess that, ask why wouldn't that same efficiency be more valuable in some other field that is less crowded because automatic stock trading is a very low percentage game right now.

</comment><comment><USER18> This old HN thread may be relevant: [https://news.ycombinator.com/item?id=4748624](https://news.ycombinator.com/item?id=4748624)

<comment><AUTHOR> Thanks for sharing, seems very close to what I'm trying to do. Will give that a thorough read!

</comment></comment><comment><USER19> I started doing this after reading one of the Motley Fools' investment books (Rule Breakers - Rule Makers) ... fortunately I never asked it to trade real money. A few years later and MF has completely disavowed the techniques in that book (and I would have lost whatever I put it).

Now I just throw darts ... unless you can get some insider knowledge like the big boys, you'll never be the early mover.

</comment><comment><AUTHOR> I want to clarify, the intention of this system is specifically to NOT be a HFT system because I'm aware of the large handicap associated with inferior data available at slower speeds. It's intended to primarily help with stock picks since it can look through more data than a human can. This would involve both fundamentals and technical analysis. The most frequent trades would be once a day and may end up being closer to once a month. It is intended to be a low-cost solution. I would like the trades to be done by the system but the approach will not require it.

Based on some of the comments it seems such a system will be the underdog and will be the prey for the large HFT shops. And that's one of the risks of such an experiment. Once I put in real money into this (not too much, but just enough to not be consumed by the fee) there will be a hard point after which I'm ready to throw in the towel. I think of this more like an investment management software that has more knowledge than myself (various trading techniques, tax laws, etc.).

</comment><comment><USER20> Someone can please give me some trustworthy, scientific reading material to give people asking me to proof the point 'systematically beating index performance on the stock market, using only public available data, is not possible'? Intuitively i understand this is true, so no need for holywar. Same also applies to commodities trading.

<comment><USER5> You don't need scientific proof or reading material - the theory you are trying to prove is wrong.

Just look at the number of billionaires who have decades long 20,30,50% average returns - not possible by chance.

The efficient market hypothesis believers say that these people were lucky.

People who say that don't understand probability.

The probability of winning big one year is probably not that rare - lotto win sort of numbers, and given the number of players and the number of iterations - easily explained away.

However, the existence of scores of individuals who have been able to profit for long periods of time completely destroys the efficient market hypothesis, because the hypothesis says they can't exist.

Take one single example ; Richard Dennis. He started off with $1500 and ran it up into hundreds of millions. He then taught a group of people who had zero trading experience his system and then they went off and made hundreds of millions (some are still going).

[http://en.wikipedia.org/wiki/Richard_Dennis](http://en.wikipedia.org/wiki/Richard_Dennis)

That is completely non-random outcomes. The efficient market hypothesis is something that academics wet themselves over while other people laugh at their theories and make millions.

Essentially, for 'systematically beating index performance on the market using publicly available data is not possible' to be true, then the scores of people who have done just that, over decades, cannot exist. And yet they exist.

<comment><USER16> Richard Dennis is a weird example to use, given that he ended his career losing tons of _other peoples money_.

If anything he is a perfect example of luck...

<comment><USER5> Well, no.

The fact that Richard Dennis chose to stop taking customer money after a bad loss in the 87 crash proves nothing.

The EMT/EMH states that because all the information is in the he public domain, returns above market over time are not possible. Anyone with the slightest interest in human nature understands that two different people with the same information can come to two entirely separate conclusions. Any glance at election results will tell you that.

Richard Dennis developed a system that produced outsized returns over a long period of time using public information. He then taught this system to others, who then used it to also make outsized returns using public information. Thus disproving the hypothesis.

The fact that he gave back a small portion of his total returns in a particular market event doesn't change the basic facts. Even if his strategy no longer works, the fact that it did work for a long period of time disproves the theory. He was able to use public information to decide to abandon the strategy when it no longer worked.

<comment><USER16> I certainly am not the person to backup the EMH (my complaints about it are more about the lack of provability/usefulness) but you are completely misstating some very central points about the EMH and more specifically about Richard Dennis.

1 - no version, even the most strict, of the EMH claims that returns above market over time are not possible. The claims are about the prices of assets and their relation to information. So even a very strict interpretation of the EMH wouldn't say you can't make above market returns over time, only that you can't do it because you know something no one else does. Random movements or other non-knowable events are not part of the EMH.

2 - all EMH versions talk about _risk adjusted_ returns. So if you place an incredibly risky bet, that pays off, that does not violate any form of the EMH. The Dennis system was particularly risky, especially in comparison to other market participants like him.

3 - Dennis' _system_ did not perform well over a long period. The _system_ does not perform well past 1986 and was only first codified in either 1983 or 84. Dennis performed better over that time, but his system did not. This is evidence that he was lucky, not beating an efficient market. Even if we take the most charitable view of Dennis' system, not that it was luck, rather it was some new found previously unknown information, that _backs up_ less strict forms of the efficient market hypothesis. The market responded to the actors in it finding an inefficiency by making that efficient to the point of the opportunity disappearing.

</comment></comment></comment></comment></comment><comment><USER21> My 2 cents - don't reinvent the wheel. Use quantopian.com - it has great community, where you can learn a lot. Their trading system called ZipLine[1] is open sourced, so I guess you can extend it to fit your specific needs.

[1] [https://github.com/quantopian/zipline](https://github.com/quantopian/zipline)

</comment><comment><USER22> Don't get discouraged by the negative comments. It's completely possible to make a profit (with low risk) without resorting to HFT.

I'd recommend you read Quantitative Trading by EP Chan for a great overview of the basic methods and some example implementations.

Disclaimer: I've done exactly this successfully for >2yrs now.

<comment><USER8> > Don't get discouraged by the negative comments.

No, of course not. Jump in feet first with all that you've got and to hell with common sense.

> It's completely possible to make a profit (with low risk) without resorting > to HFT.

Yes it is. For a while at least.

> I'd recommend you read Quantitative Trading by EP Chan for a great overview > of the basic methods and some example implementations.

Reading is always good, second that.

> Disclaimer: I've done exactly this successfully for >2yrs now.

I know gamblers that have been on winning streaks too. Unfortunately that's not how the story ends, especially not for novice gamblers.

It's nice you have found a way to consistently beat the market and I really hope that you're outperforming the lowly index funds but without more data 'successfully' is awfully un-specific.

I made some money in the stockmarket too, but I'm not going to dress is up as intelligence, I'd rather admit that it was dumb luck.

</comment></comment><comment><USER23> I've worked in the electronic trading aka hft market now almost 7 years. The big boys are optimizing their trades down to the nanoseconds, they are spending big money on bleeding edge network technologies, colocating their servers _inside_ exchanges, etc.

If you expect to compete with them on AWS save yourself the loss and just stop right there. However, if your strategy is more or less buy and hold for weeks / months then this doesn't sound entirely unreasonable. From my experience, simply getting into this industry as a serious player is roughly a 10-12 million investment, and that is starting very very small in only a few exchanges.

</comment><comment><USER24> Use paper trading for a while on a platform like Interactive Brokers before going live. You will find it's unlikely you discovered the holy grail but hey maybe you have. Just be wary of a common trap for both beginners (excusable) and longtime market pros managing billions (not so excusable) - lots of strategies look great while testing because they have a payoff matrix which yields +1$ 95% of the time and -$1000 5% of the time. Obviously this is a poor ex ante bet but you are unlikely to empirically observe/discover the asymmetry at first when it just seems like you are printing free money.

</comment><comment><USER25> I'am working on this.

Only using python , ipython rethinkdb and postgresql.

We are working on a event driven fund to find pattern, but we still need human at the end (the program found pattern and we try to find why and if they are reproductible).

Good luck :)

<comment><AUTHOR> That's very interesting. I'm trying to integrate the concept of "special events" like earnings or dividends or announcements into the mix. Although that isn't the driving force for what I'm trying to do. I'd be interested to learn how it works out for you guys.

<comment><USER25> we are event driven here, our program help us to find regular pattern drive by event as annual press conference (we buy before and sell just before) , fda approval for biotech, black friday for amazon , or cultural event (chinese new year).

You have annoucement, but don't forget the regular one.

We are still working on this (we are around 2% per month) but i'am open to share.

Visibly i'am not the only one to do this : [http://www.reddit.com/r/stocks/comments/2v7fvk/anyone_make_l...](http://www.reddit.com/r/stocks/comments/2v7fvk/anyone_make_living_daytrading_stock_market/cof4ulq)

Mail me if you want to discuss or share

bussiere AT gmail.com

regards

</comment></comment></comment><comment><USER26> Even though backtesting is only of limited use, you should try your algorithms on fresh (you haven't previously used them) time periods and see what types of returns you can get. When I did this with my algos I was playing with, even though it seemed positive, when I accounted for the cost of the trades and the cost of the data (near-real time market data is damn expensive), I wouldn't come out much ahead of a simple buy-hold index fund approach.

Invest the minimum amount you can in this project to learn that it isn't a great idea.

</comment><comment><USER27> You should have a look at MetaTrader. It provide tools for back-testing and dynamic spread etc..

I have been building also my own platform (with nodejs as for high IO), but you easily loose focus when you have to build it ALL by you're self..

(opensource) platforms like MT4 / MT5 give you more time to spend on actual alghorithmes, then on data structures etc

</comment><comment><USER28> Check out omnitrader.Com as a potential platform for building your algorithms. Whilst there also check their product myomnivest. If you want to go big-time as I have, check into their Nirvana club. Not cheap but their auto trading algorithms are extremely sophisticated.

</comment><comment><USER29> There is a nice review of related methods in the book "A Random Walk Down Wall Street"

<comment><AUTHOR> Seems highly rated and a classic. Will get myself a copy.

</comment></comment><comment><USER25> One of my friend is working on a same project for a big company and some of my friends are interested in this.

I'am thinking does anyone will be interested by a specialised forum or a subreddit to share our experience and tips ?

</comment><comment><USER25> I'am thinking btw to make a portal / forum / subreddit about this topic. Anyone interested ? What format will you prefer ? Subreddit / special forum ?

</comment><comment><USER7> _gain an advantage over simplistic human investing_

What makes you think there are any simplistic humans in the market for you to take advantage of?

<comment><USER30> Oh there are a lot.

They're the first to be taken advantage of

<comment><USER7> ... As the OP is about to discover, the hard way.

</comment></comment></comment><comment><USER31> Would you like to team up and build something? I have some ideas that can help build better algorithms. curran736 at gmail.com

</comment><comment><USER32> Look for patterns of insider trading and hop on. Oh, and trade offline portfolios for much longer than you think necessary.

</comment><comment><USER33> I'm curious how you will link your program with your broker account? do they provide rest api for stock trading?

</comment><comment><USER34> Great work! I haven't done such things, but I'm curious: what books/papers is your software based on?

<comment><AUTHOR> I haven't based this off of any existing papers yet, I'm intending for it to start off as fresh research, and depending on how it goes, maybe include/test theories from existing papers. Do you have any papers that you would recommend?

</comment></comment><comment><USER30> The only thing you're going to automate is the emptying of your account.

> I'm planning to host this on AWS and use a combination of Python and R.

Yeah, great idea. NOT. Unless you're doing something like tens of trades per day, or less.

<comment><AUTHOR> @raverbashing, One trade a day, maybe even less.

</comment></comment><comment><USER35> You may want to take a look at [http://quantopian.com/](http://quantopian.com/), who make an engine that does just that. A lot of brokers actually support this.

The reason appears to be that there are lots of stock trading packages that people want to use (and to be fair, most brokers' interfaces suck somewhat. Also one interface for 2-3 brokers sounds appealing to me).

Here is an article about one such trading API:

[http://www.quantstart.com/articles/Using-Python-IBPy-and- the...](http://www.quantstart.com/articles/Using-Python-IBPy-and-the- Interactive-Brokers-API-to-Automate-Trades)

Most API's also let you play with the "fake money" accounts of the brokers. But keep in mind that they usually cheat on transaction costs in those modes.

You may want to read a lot of the algorithms on Quantopian. To be frank, the only one that really makes sense to me is the "auto-rebalancing" approach. What this does it it keeps your investment at what you set it.

Say you invest 50% in automotive stocks and 50% in nasdaq stocks. Nasdaq goes up 10% -> it sells 5% of the profit and invests it into automotrive stocks. This is one of the few algorithms that seems to :

1) beat the market

2) actually spreads risk around (or it seems to me it does, depends on your investment spread I guess)

<comment><AUTHOR> I had actually looked into quantopian when I was getting started, but decided not to use that for my primary source of backtesting because they place limitations on users since that reduces pressure on their systems, allowing them to scale. This restricts backtesting ability and was a dealbreaker for me. The publicly shared algorithms, on the other hand, seem like they can provide a lot of insight, and I will look into those. Thanks!</comment></comment>


Clojure 1.0 - <AUTHOR> http://clojure.blogspot.com/2009/05/clojure-10.html

<comment><USER2> Does anyone know if Clojure is GCing lambda's yet?

<comment><USER3> Lambdas created in eval can be garbage collected as of r1232

</comment></comment><comment><USER4> Discussion is here <http://news.ycombinator.com/item?id=592314>

</comment><comment><USER5> It's ironic that this was posted as the same day as this --> <http://news.ycombinator.com/item?id=591897>

Would be interesting to see how a version in Clojure compares.

</comment><comment><USER6> sorry, but repeated</comment>


Tips for marketing a Kickstarter campaign? - <AUTHOR> https://capitalandgrowth.org/questions/1106/tips-for-marketing-a-kickstarter-campaign.html <comment><USER2> My key takeaway: "The video is the most important part of your marketing strategy."

That's definitely the only thing I look at when I check out a Kickstarter campaign.</comment>


Seattle Rex vs. Apple: The Verdict Is In - <AUTHOR> http://www.seattlerex.com/seattle-rex-vs-apple-the-verdict-is-in/

<comment><USER2> Yes, I could be accused of being a rampant fanboy, but this is just so different from my experience having an out-of-warranty no-AppleCare 15" MBP with the same issue being replaced (for free and with minimal hassle) that I find it hard to believe there isn't more to the story.

Reading the previous entry, it sounds like he brought the thing in only once it was good and dead (months after it started glitching) and then wanted a no- questions-asked replacement, and refused to follow their diagnostic procedure which might have cost some money in the event that the GPU was not the thing keeping it from booting. He then literally walked out of the store without a word after not getting his way.

It seems like by assuming bad faith on the part of the people he dealt with he ended up bringing it about.

<comment><USER3> Wow, THAT is how you read the article? I feel kinda sad for you.</comment></comment>


Interview with Bill Joy (1984) [pdf] - <AUTHOR> https://begriffs.com/pdf/unix-review-bill-joy.pdf <comment><USER2> Wow, an interview from Year 1 MIP!

Bill Joy's Law: 2^(Year-1984) Million Instructions per Second

[https://medium.com/@donhopkins/bill-joys- law-2-year-1984-mil...](https://medium.com/@donhopkins/bill-joys- law-2-year-1984-million-instructions-per-second-3a8c92165cfe)

>The peak computer speed doubles each year and thus is given by a simple function of time. Specifically, S = 2^(Year-1984), in which S is the peak computer speed attained during each year, expressed in MIPS. -Wikipedia, Joy's law (computing)

[https://en.wikipedia.org/wiki/Joy%27s_law_(computing)](https://en.wikipedia.org/wiki/Joy%27s_law_\(computing\))

>Introduction

>These are some highlights from a prescient talk by Bill Joy in February of 1991.

>"It's vintage wnj. When assessing wnj-speak, remember Eric Schmidt's comment that Bill is almost always qualitatively right, but the time scale is sometimes wrong." -David Hough

</comment><comment><USER3> Thread from 2012: [https://news.ycombinator.com/item?id=4940918](https://news.ycombinator.com/item?id=4940918)

and a bit from 2015: [https://news.ycombinator.com/item?id=10145982](https://news.ycombinator.com/item?id=10145982)

</comment><comment><USER4> Needs a '1984' tag in the title.

<comment><USER3> Added. Thanks!</comment></comment>


Molten Salt Reactors - <AUTHOR> https://whatisnuclear.com/msr.html <comment><USER3> The elephant in the room with any kind of fission reactor is that they are going to need a lot of security. Even when the fuel and waste product is not weapons grade uranium, it's still highly radioactive and a great source of material for a dirty bomb. Basically anything that goes boom combined with small amounts of radioactive material and a bit of wind is a great way to depopulate e.g. large cities. So, having lots of small molten salt reactors all over the planet, which seems like the key selling point, is not a great idea from that point of view. Having them in or near any kind of conflict zone would be super risky. And according to this article there is actually some weapons grade uranium being produced as well which makes this even more problematic.

The security aspect would make this a lot more expensive than it already is and cost is already on the high side even before you consider that. This is a problem with traditional reactors as well but they have the advantage that they are huge facilities and that there are only a handful of them; so securing them is relatively easy.

People are suggesting this as complementing renewables but the cold hard truth is that renewables are already dirt cheap and on track to continue to drop in price by magnitudes for the next decades. That includes battery storage as well. Already quite cheap, also dropping in price, and typically already factored into e.g. new solar bids that are killing competing bids for coal and gas plants (or in some cases shutting them down prematurely).

Even at the current prices, that's a problem for any kind of nuclear solutions being contemplated right now. At the low end of the spectrum, we are talking 2 cents per kwh currently. Imagine this dropping to something like half a cent or even less. At those prices, the security alone would make nuclear too expensive probably. A 1 mw facility would have basically be generating only about 500-2000$ worth of energy per hour but only at peak demand. There's no guarantee prices won't drop way below that either. Any kind of operational overhead would be a problem. Needing 24x7 intense security would be very undesirable.

<comment><USER4> Are you suggesting that variable renewables plus batteries will approach prices that are... too cheap to meter?

Looking at current cost VRE trends, when variable sources contribute up to 4% of world energy, and surrounded by massive amounts of cheap but high-carbon natural gas, and assuming that the trends will just continue exponentially downward without serious complication, is optimistic.

Cost of integration of variable sources plus batteries is expected in many studies and somewhat intuitively to skyrocket as market penetration increases. When you have enough VRE to cover 100% including the big evening peak with batteries during a clear summer day, the extra generation you build to fill the other gaps gets curtailed. But you have to fill daily and then seasonal gaps, worldwide, including heat in winter and worldwide transportation (not just electricity). Buying that battery that is only even needed at all every third day is 3x the price, yet we prefer if the power doesn't brownout with this frequency. This is difficult. Already we're seeing NIBMYism in large solar installations in california and with transmissions lines. That gets worse with scale.

Nuclear today is a hedge against the possibility that deeply carbonizing with variable renewables + storage at world scale will be harder than we all think and hope it will be.

That said, nuclear certainly needs to drop capital and O&M cost dramatically if it wants to play the game. And security is indeed a big factor in this. Its competition in the small-footprint dispatchable world is natural gas with full CCS, which is also looking pretty cheap.

<comment><USER3> Yes. Not indefinitely of course but we've seen nothing yet and there's enough in the research pipeline to suggest clear trends over the next two decades in terms of cost improvements, efficiency improvements, cheaper materials, etc. That 4% you mention was less than 1% not so long ago and will be closer to 40% not too long from now. Such is the nature of exponentials.

IMHO 5X cost reduction is basically a done deal even just applying simple economies of scale. You can argue whether this happens in five or ten years maybe but arguing it isn't happening seems futile. Beyond that, 10x is extremely likely to happen as well. There's a lot of research happening that would need to be a complete failure/waste of time for that to not happen. At worst it will happen slower that I might like. Maybe this happens over the next decade. Or two. Or three even. From there, 20x might be quite possible as well.

Beyond that we're indeed talking rapidly diminishing returns. 10X would mean 0.2 cent/kwh. 20x would cut that to about 0.1 cent. This indeed gets you in to territory where metering it becomes more expensive than is worth the trouble. The average household uses about 15000 kwh per year, or about 150$ worth of energy at these prices; much less outside the US. Much of that is going to be produced on people's roofs or in their back yards. At that point it turns into a fixed cost.

Historically the same sources producing the studies you are referencing have been off by magnitudes predicting current adoption and prices for both solar and wind. So, I'd consider that the pessimist glass half empty point of view. Not to dismiss it entirely but arguing cost increases seems a bit far fetched in light of current trends in the market.

<comment><USER5> Aren't roof solar panels very inefficient? They can't track the sun and you can't have good density from them either. Furthermore, they don't work for office buildings and apartment buildings.

> _Not to dismiss it entirely but arguing cost increases seems a bit far > fetched in light of current trends in the market._

I think what the parent was saying is that because solar and wind don't reliably produce energy, we will need redundancy. As the market share of solar and wind grows we will need to increase the amount of storage and power generation far beyond what we normally need to operate.

Let's say you have a city that uses 1 GWh of electricity per day. If you were to generate all the electricity with natural gas then you need to have 1 GWh plus _some_ extra for redundancy to fulfill the needs of the city. If you generate 5% with solar and the rest with natural gas then nothing really changes. If the weather is bad then the natural gas plant will step in.

As the share of your solar power generation grows toil need more and more redundant storage and solar power generation. If you rely 100% on solar power generation and the weather can be bad for a week in a row over the city, then you'll need storage that will last for more than that entire week. Not only that, you'll also need extra power generation capability to be able to fill and maintain that storage.

Just to put this into perspective: the US uses about 10 TWh of electricity per day.

<comment><USER3> > Aren't roof solar panels very inefficient?

They are good enough. Low efficiency just means we have to buy more of them. Obviously we'd need solar plants (and maybe wind parks and other clean sources) to also power those with limited access to roof surface.

Of course, bad weather doesn't mean solar stops working; it just reduces the output. The effect is typically very local as well. So, all that means is that you need a bit extra capacity to cover for that or import energy from somewhere else where the weather isn't miserable.

When (not if) the price for solar and wind drops 10x, you'll be able to buy 10x more than what you need and still beat coal/gas/nuclear on price. 10x is an insane safety margin that would mean you produce more than you need even on the most cold, dark, and miserable day imaginable. And of course solar is not the only source of clean cheap energy. Wind would be another popular option.

<comment><USER5> Bad weather in northern Europe means that everything is covered in snow for a long time. I think that's slightly more than just reduced output. The snow also tends to cover am area that's hundreds of kilometers in every direction too.

<comment><USER3> I've lived in Sweden and Finland. It's actually the lack of sunlight that is causing issues with solar. The snow is much less of a concern. E.g. Helsinki only gets a few hours of daylight and the sun does not get much above the horizon in the winter months. The reverse is true as well; you get insane amounts of sunlight in the summer months. Luckily there's wind, hydro, wood pellets, and a few other alternatives.

Further south in Germany, Netherlands, etc. Solar is usable throughout the year and quite common. Obviously output in the summer is going to be much better than during the winter.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> I thought LIFTR was the coolest thing ever. MSRs could have revolutionized power generation... about two decades ago.

Solar/Wind/Storage are beating almost everything. Everything they aren't... they will, very soon.

It's possible that MSRs could be scaled down and their liquid nature means that the reactor could simply be replaced on a schedule and the entire old reactor "reprocessed". But the investment won't be there with wind/solar/battery eating everyone's lunch.

And that's IF regulatory was simplified and IF you were able to get enough starting fuel to initiate breeding of the thorium.

<comment><USER5> Renewables have the problem that the larger the portion of your power that's generated through these renewables, the exponentially more storage you need. It's not a linear relationship, because you can have weather that doesn't cooperate for long periods of time, but the power can't go out.

Another issue is that solar and wind aren't really suitable everywhere. The further north you go the less economical solar becomes. A large chunk of Europe sits further north than the US.

<comment><USER7> What's happening right now is that renewables are being paired with an increasing number of gas power plants. Since gas power can ramp up so quickly they're a good match until storage can take over.

So I think we already have the solution to the problem you're describing: just pay to maintain a decent amount of the existing gas power plant. If they're only there for backup, the impact on CO2 emissions will be negligible. You could even make the gas from renewable sources, since in this scenario the cost of the gas itself is negligible compared to cost of keeping the power plant operational.

This is incidentally another reason (current) nuclear is a dead end going forward. They're a bad match for renewables. What we need isn't more base load, we need more peaker plants, load following plants, backup plants and energy storage. Nuclear isn't a good solution in any of these categories.

<comment><USER8> Any increase in base load would reduce the amount of renewable+gas/storage capacity needed, so at worst it's a neutral match for renewables.

</comment></comment></comment></comment><comment><USER9> The usual quip in the industry is that the remote maintenance is such a complicated robotics problem. that which ever company is able to solve it, is better off converting to a robotics company and just drive Kuka, Fanuc and ABB out of business.

<comment><USER10> Is it a hard robotics problem or a hard radiation-hardening problem?

<comment><USER11> Completely robotically maintaining a complex machine sounds like a hard robotics problem to me. Of course it can be designed for machine manipulation but that seems like a pretty complex fusion of robotics and nuclear reactor design. So I think it would be a lot of work.

<comment><USER12> It seems to me that the simplest reactors tend to be the most dangerous. I'm thinking of the Windscale fire and SL-1 in particular. One of the theories for what went wrong at SL-1 is that it was a murder-suicide, caused by the man tasked with physically manipulating the control rods of the reactor. I think robotic control is better for something like that. Robots are more predictable.

One of the aggravating factors at Windscale was their inability to perform maintenance tasks behind the reactor. They had canisters of radioactive material smashing open behind the reactor and it took them ages to even notice. That was a _very_ simple reactor design; basically a nuclear pile. It was also an awful design that was irradiating England even before it caught fire.

<comment><USER13> The Windscale reactors were built in a hurry in 1950 to produce nuclear weapons after Russia managed to test it's first atom bomb in 1949 and are not really representative of modern power generating technology.

<comment><USER12> Obviously Windscale wasn't modern and SL-1 certainly wasn't either. My point was that simple designs are poor designs, that modern designs are complex for good reason. The added system complexity of automation is well worth it when it comes to nuclear power.

</comment></comment></comment></comment></comment></comment><comment><USER14> From the article: >if something goes wrong in a MSR and the temperature starts going up, a freeze plug can melt,

A MSR does not need any sort of valve to drain the fuel. ORNL-MSBR was designed to drain the core when pumps stopped working. The real advantage of freeze valve is that is uses no moving parts and _maintanence_ free/friendly.

ORNL-4528: "The fuel salt pump and its sump, or pump tank, are below the reactor vessel, so that failure of the pump to develop the required head causes the salt to drain from the reactor vessel through the pump tank to the fuel salt drain tank."

</comment><comment><USER15> > Protactinium-233 decays to pure, weapons-grade U-233

<comment><USER16> I thought it was Uranium 235 which was the common weapons material, so I looked up Wikipedia [1]:

> ... While it is thus possible to use uranium-233 as the fissile material of > a nuclear weapon, speculation[8] aside, there is scant publicly available > information on this isotope actually having been weaponized ...

[1] [https://en.wikipedia.org/wiki/Uranium-233#Weapon_material](https://en.wikipedia.org/wiki/Uranium-233#Weapon_material)

<comment><USER4> In the nuclear industry, U-233 is well known as an excellent weapons material [1]. It's simply a matter of its nuclear properties, which are well known.

"The fast critical mass of U-233 is almost identical to that for Pu-239 and the spontaneous fission rate is much lower, reducing to negligible levels the problem of a spontaneous fission neutron prematurely initiating the chain reaction -- even in a "gun-type" design such as used for the U-235 Hiroshima bomb (see Table 1)."

[1] U-232 and the Proliferation-Resistance of U-233 in Spent Fuel - [http://scienceandglobalsecurity.org/archive/sgs09kang.pdf](http://scienceandglobalsecurity.org/archive/sgs09kang.pdf)

</comment></comment></comment><comment><USER17> The big problem with nuclear driven steam turbines is that they cannot be cheaper than thermal coal driven steam turbines due to costs-- construction, operation and decommissioning. Their LCOE is just not great and not lowering quick enough.

Even thermal coal is getting out priced by solar/wind+ batteries. And the latter will always get cheaper due to economies of scale and learning rate reductions not to mention core technological advances.

Nuclear would have kept us out of the carbon free energy mess decades ago but it's not the answer in 2019.

</comment><comment><USER14> >Tritium production: If lithium is used in the salt, tritium will be produced,

Not a disadvantage for all MSRs. Both lithium and beryllium can be avoided. FLiBe is required for efficient MSRs and MSBR.

>Mobile fission products

It is the only disadvantage common to all molten-salt reactors and all fluid- fuel reactors. Pumps and pipes have to handle a hot radioactive liquid.

> Material Degradation

Common to all nuclear reactors, solar, coal boiler tubes, etc. Components used in reactor core do not last long. MSRs dispose nickel tubes and LWRs dispose zirconium tubes and uranium.

>Proliferation...The problem with MSRs, then, is that the fuel is already completely cut open and melted. >it will be difficult for the IAEA to distinguish plate-out losses from actual proliferative losses.

The fuel salt loop can be sealed tamper-proof. The entire fuel salt loop is analogous to a fuel assembly. Weigh the entire fuel salt loop. Vapor pressure of actinide-halide salt is very low at operating temperatures. Actinides don't move out of this loop.

<comment><USER18> Regarding pumps and pipes, the Moltex design avoids them entirely. Liquid fuel is contained in vertical fuel rods, open at the top to allow escape of gaseous fission products (some of which are strong neutron absorbers). The pipes are mostly immersed in a pool of molten salt coolant.

[https://www.moltexenergy.com/](https://www.moltexenergy.com/)

</comment></comment><comment><USER19> > Molten salt fuels were first conceived of in the late 1940s, when people > began thinking of nuclear powered airplanes! > The idea was to have very > long range bombers in the air at all times

I had never heard of this idea, and thought it was super interesting. Imagine aircraft that could stay in the air indefinitely (for some practical purposes), carrying massive loads without fuel being a concern.

Similar to nuclear aircraft carriers and submarines, at least conceptually.

[https://en.m.wikipedia.org/wiki/Nuclear- powered_aircraft](https://en.m.wikipedia.org/wiki/Nuclear-powered_aircraft)

<comment><USER20> In the long run nuclear jets could be really useful for the exploration of planets that don't have free oxygen in the atmosphere like Venus, Saturn, etc.

</comment></comment><comment><USER14> >Complex chemical plant

This is not a disadvantage for all MSRs. Only breeders need chemical plant. Not fair to compare a solid-fuel burner to liquid-fuel breeder.

Let us compare liquid fuel breeder vs. solid-fuel breeder: Reprocessing solid- fuel involves more complex chemical plant with physical mechanisms to declad and convert solid-fuel to a processable liquid. Fabricate processed liquid to solid-fuel and put it back in the reactor. Solid fuel breeders have additional physical and chemical processes/steps.

</comment><comment><USER21> The largest reserves of thorium exist in India and China - two of the most energy hungry and polluting economies. One is on the UN Security Council and the other has a unique waiver from the US Congress on proliferation - <USER2> fissile material production is not the primary concern.

Both India and China have massive deployments of renewable energy, yet the demand for energy is outstripping projected build-out. LTFR is going to be one of the best answers if it can be made safe.

<comment><USER22> [https://en.wikipedia.org/wiki/Occurrence_of_thorium](https://en.wikipedia.org/wiki/Occurrence_of_thorium)

From there it seems like India, Australia & the US all have large thorium reserves.

There is certainly heaps of it.

<comment><USER21> not disagreeing. however, the hunger for energy in India and China is causing outsize investments in MSR.

For example - [https://www.nextbigfuture.com/2017/12/china-spending- us3-3-b...](https://www.nextbigfuture.com/2017/12/china-spending- us3-3-billion-on-molten-salt-nuclear-reactors-for-faster-aircraft-carriers- and-in-flying-drones.html)

</comment></comment></comment><comment><USER23> Or just use that money for solar panels and batteries and not build a combination power plant / doomsday weapon.

<comment><USER4> MIT studies suggest that deeply decarbonizing is actually cheaper when you do some nuclear alongside your variable renewables + storage [1]. The cost of filling those seasonal solar gaps and 10-day wind gaps gets pretty large without nukes.

[1] [https://energy.mit.edu/research/future-nuclear-energy- carbon...](https://energy.mit.edu/research/future-nuclear-energy-carbon- constrained-world/)

<comment><USER24> Studies that purport to show that nuclear has a place due to inability of renewables to fill those gaps are usually assuming renewables + short term storage cannot fill those gaps. But renewables + short term storage + hydrogen can, and probably more cheaply than a system with nuclear reactors.

<comment><USER25> What's hydrogen supposed to add? It's just a type of storage, and probably not even the cheapest one.

<comment><USER24> Hydrogen has low capital cost. The capital cost/energy of storing hydrogen underground will be much less than the cost of storing that energy in a battery. If you have a storage scenario where the energy is stored for very long times, there will be few cycles of that system over its economic lifespan, so minimizing capital cost (even if that means much lower round trip efficiency) is very important.

One would still use more efficient short term storage (and over-installation of renewables sources) for diurnal load leveling.

Hydrogen can also be turned back to electrical power (at lousy efficiency) with cheap hardware. In particular, simple cycle gas turbine power plants with efficiency of 40% cost maybe $400/kW. Compare this to $8-10K/kW for a new nuclear power plant.

<comment><USER25> > In particular, simple cycle gas turbine power plants with efficiency of 40% > cost maybe $400/kW. Compare this to $8-10K/kW for a new nuclear power plant.

The problem being that it only operates ~2% of the time compared to ~100%, and has a shorter operating lifetime in practice, and that isn't counting the cost of storing the hydrogen nor the energy cost to produce it.

<comment><USER24> Yes, the power will be expensive during that 2%. But it will not contribute all that much to the total cost of operating the grid. In particular, it would be cheaper than forcing the consumers to pay for nuclear the other 98% of the time, just so it would be available during that 2%.

<comment><USER25> If it's dozens of times more expensive during that 2% because it has to recover 100% of its cost in 2% of the time then it _does_ contribute quite a bit to the total cost of operating the grid, whereas nuclear only has to make up the difference in that time between the market price the rest of the time and its overall average cost.

Storage also has the further disadvantage that you have to over-spec it. It has to be built for the highest capacity you might need and the longest duration, which you don't know ahead of time. If you build less than you need you're in big trouble, but if you build more, you pay for it and get nothing.

<comment><USER24> Simple cycle gas turbines are 20 times cheaper than nuclear power plants of equal power output. So, no, your argument doesn't hold up when the actual numbers are examined.

<comment><USER25> Being 20 times cheaper while producing 2% of the kWh because they're turned off 98% of the time makes them 250% more expensive per kWh. And that's comparing the the capital cost for the entire nuclear plant to only the turbine, not including the capital required for the hydrogen storage, or the equipment to produce the hydrogen, or the energy cost of the original generation (with large conversion losses). Or, again, the deadweight losses from the safety margin you need for surplus capacity that you might but probably won't ever use, which could double the cost or more on top of everything else. Whereas if you spec additional nuclear it means you're generating that much more useful electricity 100% of the time.

Meanwhile that kind of storage will have more difficulty finding investors, because if it turns out that some cheaper or better alternative comes along, an investment in nuclear might have to average generating power below levelized cost, but at least you recover most of the capital. Putting in $100 in capital only to have the net present value fall to $80 sucks, but not nearly as much as putting in $100 in capital for a complete write off because you were expecting to be selling to the grid 2% of the time when it turns out to be 0% between demand based pricing and better than expected competing storage technologies. Which means higher capital costs (meaning interest rates) that reduce relative competitiveness even further.

<comment><USER24> > Being 20 times cheaper while producing 2% of the kWh because they're turned > off 98% of the time makes them 250% more expensive per kWh.

Which ignores the cost of using nuclear during that other 98% (or whatever) of the time, when it is very expensive compared to the alternatives.

Yes, the cost just during that 2% is high. But the total cost is lower than if nuclear has to be forced down the consumer's throats 24/7.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER26> There's a lot of references to "plate out" in the article and most of the results I find on Google are paywalled by Elsevier - can some explain what the term means or point me to a resource?

<comment><USER27> When fuel nuclei split apart in a nuclear reactor, their split fragments form a variety of lighter elements. Some of these elements are so-called "noble" metals -- metals that tend toward remaining chemically stable _as_ metals, rather than as chemical compounds with other elements. Silver, ruthenium, and palladium are some examples of noble metals. More typical metallic elements like potassium and iron, by contrast, tend to be found on Earth as oxidized chemical compounds rather than as metals.

In a molten salt reactor, _most_ fission products either stay dissolved in the salt mix or are lost from the mix as stable gases. The noble metals are different. Their tendency is to reform as solid metal. They tend to accumulate as a metallic layer or plate of metal over other solid surfaces they come into contact with. That's what is meant by plating out.

Here is a document that specifically addresses noble metal plate-out in molten salt reactors:

[http://www.skyscrubber.com/Molten-Salt- Reactor%20Technology%...](http://www.skyscrubber.com/Molten-Salt- Reactor%20Technology%20Gaps.pdf)

See section III.C.

</comment></comment><comment><USER14> From the article: >Problems with Molten Salt Reactors... >...but similar problems may show up in long-lived power reactors.

Author assumes that MSR components should last as long as vessels and secondary heat exchangers of solid-fuel reactors. The author should understand that vessel and primary heat exchanger of a fluid-fuel reactor is anologus to fuel rods. Solid fuel reactors just dispose primary heat exchangers or fuel rods every few years. Example: Zircolloy tubes worth a MSR vessel + heat exchanger is just disposed along with partially fissioned degraded solid fuel every 4.5 years in a LWR. Zircolloy (Hafnium separated nuclear grade zirconium + additives) is more expensive than commercially available nickel based alloys.

Graphite is a solid with a crystal structure. Crystal structure degradation under radiation is permanent and there is nothing anyone can do to reverse it. Solar panels degrade similarly. Nuclear industry handles solid-fuel rods which are far more radioactive than MSR graphite and complains that it can't handle MSR graphite. Just shows that either industry is incompetent or it is not interested in efficient fluid-fuel reactors. Does nuclear industry aims >1000 GW of nuclear capacity? Does nuclear industry care to solve global energy related issues? Efficiency really matters when we have >1000 GW of installed nuclear capacity. If all energy is obtained from nuclear, (12000-16000 GW) even seawater uranium get used up in 40-60 years with inefficient solid-fuel reactors.

<comment><USER27> > _Efficiency really matters when we have >1000 GW of installed nuclear > capacity. If all energy is obtained from nuclear, (12000-16000 GW) even > seawater uranium get used up in 40-60 years with inefficient solid-fuel > reactors._

That can't be right. About 200 tonnes of natural uranium is needed to produce 1 GWe per year in conventional reactors [1]. That's 3,200,000 tonnes per year if you mean 16000 GW in the form of electricity, or closer to 1 million tonnes per year if you're referring to primary (thermal) energy. Seawater contains about 4.5 billion tonnes of uranium [2]. That's well over a thousand years' worth of uranium, either way.

[1] [https://www.world-nuclear.org/information-library/nuclear- fu...](https://www.world-nuclear.org/information-library/nuclear-fuel- cycle/introduction/nuclear-fuel-cycle-overview.aspx)

[2] [http://large.stanford.edu/courses/2012/ph241/ferguson2/](http://large.stanford.edu/courses/2012/ph241/ferguson2/)

<comment><USER14> Firstly heat from inefficient low temperature solid-fuel reactors can't be used directly for many applications. So consider electricity. Cars/planes/kitchen-stoves cant use uranium or nuclear heat!!

All 4.5 billion tons can't be extratcted. More we extract, concentration decreases and harder it gets. I keep asking this question: If seawater extraction of metals is practical, why aren't we extracting other costly metals now? [https://twitter.com/AchalHP/status/1011661441412337665](https://twitter.com/AchalHP/status/1011661441412337665)

<comment><USER4> Don't confuse solid fuel with traditional light water reactors. The highest temperature reactors are triso fueled helium cooled solid fuel reactors like HTTR with outlet temperatures over 1000C. Also, fast breeder reactors with solid fuel are just as sustainable as any fluid fuel breeder.

Molten salt is one of about a dozen advanced reactor techs that has huge potential.

Hard part is economics. Hazardous coolant has been a pain to maintain cheaply so far.

Also seawater uranium replenishes from erosion and plate tectonics so it will effectively never decrease in concentration, even if we pull it out at world scale.

[http://large.stanford.edu/publications/coal/references/docs/...](http://large.stanford.edu/publications/coal/references/docs/pad11983cohen.pdf)

<comment><USER14> The successor of LWR/HWR should be a fluid-fuel reactor.

Once we setup a pebble/advanced fuel making factory, closing it will takes decades (because people may lose jobs) and the new solid-fuel factory will again pause nuclear innovation for another 100 years. The only way to continuously improve nuclear reactors is to go fluid-fuel. No engineered fuel, so no job loses. Reactor innovation is independent of fuel factory. Nuclear fuel becomes a commodity instead of engineered speciality. Example: MSRE ran U235 and U233 without any modification.

Secondly, solid fuel reactors throw away fuel along with heat exchange surfaces (clad). Fuel also undergoes crystal structure degradation along with other solid structures. Maybe there is enough fuel in the seawater, but there may not be enough places suitable for geological repositories.

Solid-fuel reactors always need excess reactivity reserve. Always needs control rods, and if someone (or a bad actor) pulls all the control rods, reactor gets supercritical. Needs highly skilled people and needs security.

For emergency shutdown of solid-fuel reactor, poison is added to coolant, not fuel. In an emergency, poison is added to the liquid-fuel, permanently destroying the fuel. Emergency can be anything, from a natural disaster to terrorist attack. Fluid-fuel reactors offer unbeatable safety features against anything.</comment></comment></comment></comment></comment>


The problem of increasing human energy (1900) [pdf] - <AUTHOR> http://aetherwizard.com/tesla/Articles/ProblemOfIncreasingHumanEnergy.pdf <comment><USER2> FTA, Tesla making the case for a vegetarian diet:

"[V]egetarianism is a commendable departure from the established barbarous habit. That we can subsist on plant food and perform our work even to advantage is not a theory, but a well-demonstrated fact. Many races living almost exclusively on vegetables are of superior physique and strength. There is no doubt that some plant food, such as oatmeal, is more economical than meat, and superior to it in regard to both mechanical and mental performance. Such food, moreover, taxes our digestive organs decidedly less, and, in making us more contented and sociable, produces an amount of good difficult to estimate. In view of these facts every effort should be made to stop the wanton and cruel slaughter of animals, which must be destructive to our morals. To free ourselves from animal instincts and appetites, which keep us down, we should begin at the very root from which we spring: we should effect a radical reform in the character of the food."

<comment><USER3> I support the vegetarian movement from the perspective of cruelty, sustainability, and eco-friendliness. My understanding is that Telsa's belief that a veggie diet is superior (regarding mechanical and mental performance) has been disproven. Anecdotally, of the people around me, I've seen no correlation in the top athletic/career achievers to any kind of diet. Rather, balanced and disciplined eating seems to correlate.

Are there any good sources for a particular diet/restriction that correlates with mechanical or mental performance? Anecdotally the top performers I know generally balance meat/fruit/vegetables, eliminate sugar, and follow other common nutrition knowledge without committing to any particular diets or restrictions.

<comment><USER2> > My understanding is that Telsa's belief that a veggie diet is superior > (regarding mechanical and mental performance) has been disproven

See James Cameron's "The Game Changers":

[https://gamechangersmovie.com](https://gamechangersmovie.com)

[https://www.youtube.com/watch?v=iSpglxHTJVM](https://www.youtube.com/watch?v=iSpglxHTJVM)

[https://www.netflix.com/title/81157840](https://www.netflix.com/title/81157840)

<comment><USER4> A couple videos debunking the film "The Game Changers":

[https://www.youtube.com/watch?v=Dq4Apc2Xk7Q](https://www.youtube.com/watch?v=Dq4Apc2Xk7Q)

[https://www.youtube.com/watch?v=R6Ju_HdWB0Y&](https://www.youtube.com/watch?v=R6Ju_HdWB0Y&)

<comment><USER2> Beyond question or debunking: the world-class athletes featured in the film have achieved their successes while on pure plant-based diets.

<comment><USER5> That is false. Some of the athletes featured in the movie did consume animal products such as eggs. It's a propaganda piece, not to be taken seriously.

<comment><USER2> > Some of the athletes featured in the movie did consume animal products such > as eggs.

Can you please share who that was? And corroborating links?

<comment><USER6> Nate Diaz is one:

 _" "Speaking about his plant-based diet, the athlete said: "I'm going on and off.

"I was a complete vegan for eight years, but I would dabble into some seafood every now and then.

"Now, I dig fish.""_

[https://www.plantbasednews.org/culture/athlete-on-off- vegan-...](https://www.plantbasednews.org/culture/athlete-on-off-vegan-nate- diaz-speaks-against-tofu)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> "Thus the discovery of these new properties of the atmosphere not only opened up the possibility of transmitting, without wires, energy in large amounts, but, what was still more significant, it afforded the certitude that energy could be transmitted in this manner economically. In this new system it matters little--in fact, almost nothing – whether the transmission is effected at a distance of a few miles or of a few thousand miles."

Tesla was truly a wizard!

<comment><USER8> I wonder what the side-effects would be of setting up a standing wave between Earth and the ionosphere that was so strong it could power toasters and hair dryers. In that alternate reality, there would not be very many metal-frame buildings...

</comment></comment><comment><USER9> > Teleautomation [controlled by] Hertz'ian radiations [0]

Unusual language describing how we actually do remote control today. With a picture of an example boat no less!

[0] Hertz'ian radiations undoubtedly refers to EM

<comment><USER10> > Hertz'ian radiations undoubtedly refers to EM

Specifically, EM with both longitudinal and transverse components which Tesla learned about at the 1889 Exposition Universelle (where the Eiffel tower was "unveiled") and against which he postulated EM waves with no transverse component (sometimes called Tesla waves, which is not to imply they really exist in nature.)

Edit: random downvote w/o a reply, classy!

</comment></comment><comment><USER11> This line of his haunts me:

"I wish much to tell you on this occasion - I may say I actually burn for desire of telling you - what electricity really is, but I have very strong reasons, which my coworkers will best appreciate, to follow a precedent established by a great and venerable philosopher, and I shall not dwell on this purely scientific aspect of electricity."

What _is_ electricity?

[https://www.pbs.org/tesla/res/res_art04.html](https://www.pbs.org/tesla/res/res_art04.html)

<comment><USER12> I just read his speech that he gave in Buffalo in 1897 on Thursday 1/30/2020\. And I was enamored with everything else he said--was remarking that he is my new 'spirit animal' to a friend:) But when I read what he said "I actually burn for desire of telling you" I said the same thing!!! When I wrote about it I used the same word as you--haunts. The reason my research brought me there made the sentence even more intriguing...</comment></comment>


Input: Fonts for Code - <AUTHOR> http://input.fontbureau.com

<comment><USER2> Wow, I never thought I would see proportional fonts specifically designed for coding. I've coded almost exclusively in proportional fonts for over ten years. The font I use the most is Georgia. It makes code easier to read and more pleasing to the eye, just like any other text.

Besides personal preference, I think there are two main reasons people avoid proportional fonts: column alignment and two-space indents.

Two-space indents are an unfortunate trend in coding styles, because they practically mandate the use of a monospaced font to see the indentation. I use tabs for indentation, which let each developer adjust the visual indentation to suit their own eyes. Four-space indents are OK too.

I would love to see programmer's editors provide a way to control the amount of visual indentation that each leading space represents.

Column alignment of course is not possible with proportional fonts, but that's an easy problem to solve: don't do it. Instead of this:

      void DoSomethingWithStuff(SomeReallyFancyTypeName thing,
                                string                  name
                                int                     count,
                                bool                    condition);

Write this:

      void DoSomethingWithStuff(
          SomeReallyFancyTypeName thing,
          string name
          int count,
          bool condition
      );

While you lose the advantage of seeing all the parameter names lined up, it becomes much easier to visually associate each name with its type. My eyes tend to wander when I have to scan across a wide horizontal gap to match things up.

This style also leads to much shorter line lengths as can be seen here, and it's easier to maintain: You don't have to realign things when you change the length of the function name or one of the type names, or when you add a parameter with a longer name than the ones you have already.

A case where column alignment is more useful is ASCII art in comments. I've experimented with using a monospaced font for comments and proportional for code, which solves that problem nicely. But I don't use ASCII art much myself, so I went back to proportional for everything.

I'm looking forward to trying out these fonts!

<comment><USER3> I would say that the problem is "SomeReallyFancyTypeName" where you've created a ridiculously long type name (one of the reasons I avoid Windows programming at all costs).

That aside, editors don't handle tabbing very well. It's far more space- efficient to insert two tabs instead of 8 spaces, but space and bandwidth are so cheap these days, no one can be arsed to fix what is viewed as a minor problem (use enough spaces and sooner or later, we're talking real bandwidth).

Then, there's the moment where we have to decide what those all those tabs (and sometimes spaces) mean, depending on the language, the layout rules, personal preferences, etc. For example, some people write Python with 2 spaces at the beginning of a line (which is plainly heresy). Others write it with 4 spaces (which is damnable blasphemy). Which is right?

And how many other languages are like this?(hint: any language in which layout is indented for any reason)

And concerning line length - what's the maximum allowable length before wrapping? You say 80, I say 132 (sometimes more), but I run terminal in a full-screen mode with 13-pt type, single-screened, never side-by-side.

Personally, I've learned my lesson. I'm waiting for editors to smarten up before I muck around with proportional fonts for code. Again.

<comment><USER2> Thanks for the comments. You're right, "SomeReallyFancyTypeName" was a bit of a strawman on my part. But even with shorter type names you still have the same problems if you use column alignment. I actually gave up column alignment long before I started using a proportional font. I just found it to cause more headaches than it was worth.

You mentioned that "editors don't handle tabbing very well". All the editors I use most frequently - IntelliJ IDE, Visual Studio, MonoDevelop, Komodo, Sublime Text, UltraEdit - handle both tabs and proportional fonts without any problem, so that hasn't been an issue for me. I'm curious to know what editors have trouble with tabs.

Anyway, I try not to worry too much about tabs vs. spaces. My only real objection is two-space indents. That's just not enough for many people including myself.

Of course many editors don't support proportional fonts, but that doesn't cause a problem for those of us who like to use proportional fonts in the editors that support them. It's really easy to write code that is equally readable in a monospaced or proportional font.

Regarding the line lengths, my coding style lends itself to very short line lengths, as shown in the example above. I think that helps give some freedom to use wider indentation.

<comment><USER3> This ([http://nickgravgaard.com/elastictabstops/](http://nickgravgaard.com/elastictabstops/)) is smart tab handling. All other editor aren't that great, compared to this.

</comment></comment></comment></comment><comment><USER4> Totally subjective opinion, but yet to see something beat Consolas.

<comment><USER5> I actually prefer Ubuntu Mono over Consolas or Inconsolata but fonts are a very subjective thing. :)

<comment><USER6> On my Macbook I've tried many many coding fonts, yet Ubuntu Mono is actually the best. All others either seem to render weird to me or I don't like their look in the first place.

</comment></comment></comment><comment><USER7> Scanning over the page and the 'explanation' page, I found a headache developing as I tried to read everything there.

My experience so far is that I find this far harder to read. For reference's sake, I don't do parameter alignment in my own code (see Stratoscope's comment), but still find it easy to scan code in most-any monospace, probably because my eyes just know where to jump to all the time...

For all the words in favour of proportional fonts, I would venture that when the words on a page are in fact ultimately forming macroscopic symbols (identifiers), often with PascalCase or camelCase or underscore_words, uniformity no matter the characters used is perhaps a more useful feature than making the words easily comparable to those read in prose?

<comment><USER8> Agreed. If somebody likes that — well, that's nice. I even see on screencasts sometimes TextMate with proportional fonts, so obviously somebody will find it desirable. But it won't be me for sure. First off, what I've seen there doesn't seems readable by itself. Second, I don't really see any real benefits of using proportional fonts for coding, while drawbacks are quite big: when I'm tired or just reading quickly through the code I often find myself depending on being able to see that lines with the same number of characters have the same width.

Even more than that (maybe it's something like "professional deformation" already, but I'm fine with it): I've considered using non-monospaced fonts automatically for stuff like LaTeX or markdown, or my own txt notes, but didn't find it pleasant enough. For all the european languages, anyway — typing japanese in vim is a bit painful for me and I don't know languages with more exotic writing system, be it arabic or hindi. I even hard-wrap natural language texts, which would be crazy using proportional font — and am glad I did so, when I want to see it through `less` on fullscreen.

</comment></comment><comment><USER9> Maybe this is the place to ask about my pet peeve - why do fonts, including specialized coding fonts, position parenthesis with both sides equally?

I mean, it seems that for readability it would be better to emphasize the fact that they're asymmetrical - when looking at "foo(bar)baz" , it would be better if the parens would be a pixel or so closer to their inner contents; but currently "foo(bar" on most fonts looks as if the paren is merging with the initial text.

The same would apply for foo[bar]baz and foo{bar}baz.

<comment><USER10> Fonts do it because outside of code there is just always a space character inserted before every parenthesis. Adding additional space inside the parenthesis character would just increase that space, something that is not desirable.

<comment><USER9> The topic is developer-oriented specialized fonts - so there is no such thing as 'outside of code', and in a monospaced font no space can be added since the width is fixed - so my question was about shifting the parenthesis towards the 'inside' within that width.

<comment><USER10> I was just giving a historic explanation as to why no one might have thought of that. (By the way, good modern fonts actually do a lot in terms of automatically adjusting the spacing of individual letters, and popular layout tools like InDesign offer algorithmic alternatives to whatever the font comes with by default. In proportional fonts "Te" will typically be closer together than "Th" – if you output those fonts with the right program. So fudging with spacing in some automated fashion is not out of the question.)

However, even in code it is desirable to not add extra space to parenthesis, since "foo (bar" is certainly no less common than "foo(bar". Basically, the font would have to automatically adjust depending on whether or not a space is in front of it to treat both of those cases appropriately. (I think that's possible with current font formats, so there is likely no technological hurdle to this.) However, that might not be desirable since it might make "foo (bar" and "foo(bar" easier to confuse.

</comment></comment></comment></comment><comment><USER11> This is some truly amazing work. Love the option to change the built-in line spacing.

(I'm a monospace addict, and I always switch between Source Code Pro, M+ 1m, and others. What I don't like about M+ 1m is that it's narrow, and the line- spacing in the web font is too small.)

<comment><USER12> Do you use M+1m in a retina display exclusively?

<comment><USER11> Yep, I've actually never seen it without retina display.

<comment><USER12> I think this must be made clearer when comparing fonts. I expect a lot of things to look good on retina!

</comment></comment></comment></comment><comment><USER13> On the info page:

"""
M

M

<spam class="highlight">M</spam>

M

proportional fonts can make it easier to spot typos """

The example given demonstrates that a _certain subset_ of typos can be caught using proportional fonts, but not all.

If a word has too many or too few characters in it, I think you are more likely to spot it utilising a monospaced font.

EDIT: the quote has been made more legible.

</comment><comment><USER14> Just the Mono family alone is excellent. There are a number of different weights available, each with italic and bold variants, and the repertoire of glyphs is extensive.

I enjoy condensed fonts like Pragmata Pro (which I highly recommend), and this appears to be one of the few viable alternatives I've seen. Merits a week-long test-drive, I think.

<comment><USER12> Actually, it looks a lot like PragmataPro: [https://www.dropbox.com/s/7c5yifw5saip3ae/pragmata_vs_input....](https://www.dropbox.com/s/7c5yifw5saip3ae/pragmata_vs_input.png)

<comment><USER14> Yes indeed, but with light and ultralight variants. A day later, and I'm still enjoying Input a lot.

</comment></comment></comment><comment><USER15> I have been having a love affair with Source Code Pro, thin weight, at about 14pt, using Solarized Dark color palette.

There's something refreshing about it, it's nice, big, clean, and LEGIBLE. I use it for my IDE and terminals and there's no turning back.

Highly recommend everybody check out Source Code Pro!

<comment><USER16> I just recently switched. Turns out, this is the same font that Codegansta uses, as seen here: [https://gophercasts.io/](https://gophercasts.io/)

So you can get a nice preview of it if you like :)

(though, i think he uses 12pt, i use 13pt personally.)

</comment></comment><comment><USER17> Looks nice, I've switched my terminal to Condensed and works great.

I unfortunately can't use it in my main IDE's as both PyCharm and PHPStorm have bad aliasing on Linux fortunately solved by Terminus which doesn't require it.

</comment><comment><USER18> I will likely never stop using M+ 1m, which is a somewhat unknown font. Nice and narrow. Efficient. [http://www.fontsquirrel.com/fonts/M-1m](http://www.fontsquirrel.com/fonts/M-1m)

</comment><comment><USER19> The example with breakcycles seems to be broken on chrome 36.0.1985.125 (Official Build 283153) for windows. [http://imgur.com/hd4REcG](http://imgur.com/hd4REcG)

</comment><comment><USER20> This caused me to lookup Sublime Text (3)'s font configuration options and see there were some options I didn't know about. For example, you can add line- height by adding

        {
            "line_padding_bottom": 2,
            "line_padding_top": 2
        }

to your Preferences file. Found this info here in what is also the best version of a ST manual I've seen [http://sublime-text-unofficial- documentation.readthedocs.org...](http://sublime-text-unofficial- documentation.readthedocs.org/en/latest/reference/settings.html)

</comment><comment><USER21> I like the look of it. Will definitely try for a couple of days next week. No reason not to. ☺

</comment><comment><USER22> It's nice but Pragmata Pro is teh_one

</comment><comment><USER23> I would have liked to have seen the example page have a section how it behaves with ASCII art that you sometimes see in comments.

<comment><USER24> Check out the code of the Input.com site. There is some ASCII (logo)art in it.

<comment><USER24> Woops, I mean inputfont.com

</comment></comment></comment><comment><USER25> HN would benefit from a programming font respite.</comment>