Back to Community
Submitted a Billion Dollar Algo

I just submitted an algorithm that turns 1 million into 25 million over seven years, 2500%. If I don't get an allocation, I will have no choice but to conclude that this site a complete sham, and is simply built to capture ideas and waste good programmer's time. I have saved all my code locally, as well, and will be manually trading my personal account using this strategy, obviously keeping it to myself. The algorithm met all the specifications, and performed even better during market recessions, failing to lose a single cent in 2008 and 2012. Clearly, any investor with half a brain would flock to this like a swarm of bees. Obviously, it's not the attached, but I had to use something else, given you can't post without an attachment, or even so much as add an image. I am very curious to see how this plays out:

http://www.titlelight.com/images/capture.jpg
http://www.titlelight.com/images/capture2.jpg
http://www.titlelight.com/images/capture.png

Total Returns
2578.89% - 26 million

Benchmark Returns
131.02%

Alpha
0.54

Beta
-0.24

Sharpe
2.47

Sortino
4.30

Volatility
0.21

Max Drawdown
-21.6%

59 responses

Very impressive, I always wonder what I did wrong when I get performance like this :D.

Did you run this with 10M capital and volume and price slippage enabled? Dollar-neutral? What's the OOS period?

Hi L. Williams , if i were really like you and can figure out an algo which turns 1M to 25M in 7 years, i would rather trade on my own instead of joining quantopian allocation competition. By the way, is your algo trading VIX-related derivatives (e.g. VIX, VXX, XIV) ?

@LW While likely something there, an investor would want to know how much was actually invested as initial capital is merely a goal yet is used in calculating returns (and metrics). This extreme example is really just 8%. You can use the function in this to keep track of maximum amount invested, risked.

Clone Algorithm
113
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 59e4bffc535dbc4190742926
There was a runtime error.

You certainly phrased that provocatively . . .

Six months from today, you should run the exact same code but through a different time period, ending April 16, 2018. Then check the beta, sharpe, etc. for the 6 months between today and that date. If they match the earlier periods, then yes indeed it will be an interesting algorithm. The default assumption on any backtest is that it was overfit (unintentionally, in most cases). If it continues to perform with out-of-sample data, that helps to disprove the original assumption.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

"O Ye of Little Faith"

Seriously, Dan. I'm glad you said that. I entered the contest. It started running it today. On $10,000,000, it made $41,907.66 on the first day. It's legit. See for yourself, I pasted the image below. I'm just looking for an allocation to get away from IT man. That's all I want. I'll take 10%.

http://www.titlelight.com/images/capture.png

I just updated the image below removing any details on what was traded as well as any price info. I've run this thing as far back as you can go. Not one year has it lost money, and not one year has it lost to the S&P500. In fact, you can barely see it, because it's way below the return this algorithm produces. I know it sounds hard to believe, and I'm not making any of this up. When I was young, I refused to pay attention in school. My mother thought I should see a shrink. They gave me an IQ test and found out that I had an IQ that was off the charts. So, high in fact, they retested. I'm not saying this to brag, but these sort of things come naturally to me. Numbers, finance, math, science. I don't think about the world and the universe the way normal people do. I'm just weird like that. I found Quantopian and I became addicted. The mere audacity that people would think that the Market could not be beaten was enough to keep me up at night. I'm composed dozens of algorithms. And I almost gave up. And it wasn't until I was actually fasting, that one night I decided to go back and fool around. Most people don't believe in God, but there was something different about this night. I actually made a mistake in my code and when I saw the numbers, I couldn't believe it. That was the first truly successful algorithm I wrote. It turned 10,000 into 4.9 million from 2010 - 2017. However, it couldn't scale to handle large sums. I noticed the higher I went, the worse it performed. It capped out at 1 million. So, I had to do something different. That's when I created this. That's when the ideas started streaming and I figured out how to beat all the markets, with large sums of capital using a combination of fundamental and technical analysis, along with good old fashion common sense. I will post the stats from the Algorithm daily if you like, but I know I'm right because, even with the first algorithm I created, I've emulated it in IB, and it works like nothing I've ever seen. You will believe. I just hope that you guys are who you say you are.

Sorry about the image links. That's a site I'm working on and I used shared SSL Security. I uploaded the images to another site I'm coding.

http://www.titlelight.com/images/capture.jpg
http://www.titlelight.com/images/capture2.jpg
http://www.titlelight.com/images/capture.png

To answer the questions above, it never uses leverage greater than one. It's not trading VIX derivatives. And it would be wrong to assume that I made a mistake. I've made many in my life, but that is not the case here. Also, it easily scales to 10,000,000 using the default slippage, as you can see in the image I posted. And it should not be beyond anyone's capacity to entertain the thought that someone could write a better algorithm. The human mind is a marvelous universe in and of itself, capable of incredible feats, to those who believe. Now, Dan if you can, please go and tell Mr. Fawcett that I found his golden goose, and I am humbly requesting my ten percent allocation that he promised. If he's a millionaire, I just made him a billionaire.

Anyway. Hopefully, I answered all your questions. I just submitted my code as literary copyright works. If I'm not able to get an allocation on this platform, in accordance with what's stated in the terms, I'm quite sure I can use it elsewhere, if not just for my own personal purposes. I downloaded the IB API docs and began testing them with the artificial intelligence engine I developed for trading. So again, we'll see how this pans out.

122,000 in two days on 10,00,000.

www.titlelight.com/images/capture4.jpg

Please do keep us updated every day. I'm keeping my popcorn by the laptop.

Don't you think quantopian will have access to your code or might have already gone through it by now?

I copyrighted the code as a literary work. If someone does steal it, they better keep it under wraps. A 26 million dollar algorithm stolen is enough damages to completely destroy Quantopian, not to mention potentially landing people in prison. I don't think they would do that. It's just flat out stupid. Besides, they would make more money by paying me the 10% on an allocation and farming it out to their clients. Worse my sister owns a law firm specializing in corporate law. The only motivation for stealing would be sheer unadulterated greed. I have to think that Mr. Fawcett is far more intelligent than that. He seems like a guy with a bright mind, because this platform was one hell of an idea. I just wish I could turn this thing loose on my account.

Doesn't copyrighting the work mean that you simultaneously make it available to the public? I know that's the case with patents, and I don't see how people could know not to infringe on your work unless it was made so.

Despite what the majority of people seem to think, I don't believe Quantopian would ever violate the trust of the users. They very clearly state that the IP of users algorithms belong to them, and that they will only perform tests on it - never look at the code. To my knowledge there is no proof that this is not the case, not to mention that the future of the whole platform hinges on that trust.

Which brings me to my question; why do you think copyrighting the code is necessary, or even a good idea? Seems to me that the best course of action would to just keep it a secret and wait for an allocation or trade it yourself.

Quick sidenote: Why do you estimate the algo's value at 26 million? Or did you mean something else by that?

I've already copy written both my algorithms as literary works. The notion that you would question why seems somewhat ridiculous. I would ask you to pose the same question to Bill Gates, and gauge his reaction. Better yet, do you think a Quant who worked for Goldman and decided to take a formula to another company wouldn't be held liable for damages? I think the answer is obvious. I agree with you that I don't think that Quantopian would do that. It simply doesn't make logical sense, based on what I stated in conjunction with what you stated. As far as the value is concerned, that would be up to a court to decide. However, if we take the platform at face value, and assume Quantopian's back testing mechanism is as accurate they tout it to be, if an Algorithm can take a million dollar account and turn that into a 26 million dollar account, in six years, beating the S&P500 by thousands of percentage points, it would be worth far in excess of 26 million dollars. Large institutions pay millions of dollars for far less return on capital. Most investors are lucky if they make 6%, and they sure as hell would never make 207% during the crash of 2008. The greatest investor in the world, Warren Buffett, is happy with 10%. It's been two days and we're at over 100,000 on 10,000,000.

300,000 in three days in the contest.

www.titlelight.com/images/capture5.jpg

Hi Leo, i'm just a humble engineer, happily retired, who has been trading as a hobby for a long time and now enjoying being able to do it without my former "day job" (with all its accompanying idiot clients and egotistical, over-aggressive kiddie managers to annoy me any more). I'm no genius, maybe I'm not actually all that smart, in fact I can barely even program in python. However i did work in the corporate world for a long time, mostly in a fairly tough industry, and in all sorts of "interesting" (!!) places around the world. So, I do have at least a tiny little bit of "street smarts". Maybe I'm a bit crazy to believe that the traders' "holy grail" exists, and even more so to believe that you have actually found it. However IF you have, then I would like to offer you a valuable suggestion (call it advice if you will) for which I want nothing at all in return. Here it is: "Take good care of yourself and think very carefully about what you do and how you do it". That's all. Do I need to explain? I assume that you are probably from and/or live in the US. You are now making yourself visible in the bigger world. In fact you are already visible. Most of the rest of the world works by a different set of rules (if any at all) compared to what you are probably used to. Copyrights will not protect you. Having a family member who is a lawyer will not protect you. Having a firewall and anti-malware program on your computer will not protect you. The concept of "IP" will not protect you. I'm not talking here about having to worry about Quantopian (who I believe are good people), but about other organizations and even governments who are not very nice. My wife "lost" four friends & colleagues several years ago. Do you understand what I mean? I do not wish to go into details. Those people were not talking about big money in the way that you are now. All they were doing was working as human rights lawyers & journalists in a country that is (supposedly) democratic, but which I do not wish to name. I assume you are a good person and an honest person, and I believe the same of the people at Quantopian. But you are already making yourself visible to all sorts of other people. Please be careful who you choose to play with. Sincere best wishes to you.

I'm already experiencing what you are talking about. I've been getting a slew of calls from fake recruiters and people asking me for my address information. I even took down my linkedin and created another one when some french weirdo suggested he and I have a talk with no one else present. I've had a guy who supposedly wanted me for a programming Job at a Nuclear facility, ask to meet me at a Starbucks. I've had people asking me to trade their money for them. I've had people wanting to meet me out of the blue. I've even found rogue software programs popping up on my computer, which I've had to block and uninstall. You are right. We live in a really sick world, full of sick people. I truly hope that Quantopian comes through. I honestly regret having said anything. Thank you for your advice. I truly appreciate it. Being blessed by God with intellect can be both a curse and a blessing. Being able to make people rich isn't always a good thing. I sent John Fawcett and email. I haven't heard anything back. Again, I wish I had just kept this to myself and not said anything.

1,000,000 in four days in the contest. OMG!!! I created a financial time bomb! Where in God's name is Mr. Fawcett. He should be kicking my door down to talk to me.

www.titlelight.com/images/capture6.jpg

I hope you are trading with some real money as well in some other account.

Yes, I am. Made 2000 in two days on 10k. I went long on BLFS. The program I wrote detected an FDA approval and spoke out loud to me. I got in the move at 6.56. That's because my program processes thousands of rss feeds and strips out what I've defined for it to detect. I'm going through the IB API now to have it place the orders for me in ASP.net. Fastest gun in the east. Lol. And if you thought I was joking.....

https://www.youtube.com/watch?v=wvoax1Ow-Pk

If I had an actually day trading account, I would have reversed position at the open for 500, and bought at resistance at 6.50, then reversed positions again at 7.50 where I sold, for a grand total of $2500. I'm going to decimate the market this year. It's not even fair.

That's nice, so once IB is in place you have a fully automated system.

That is correct. $kywalker will issue the trades while I sleep. He detects earnings as soon as they hit and calls them out, telling me "Earnings beat detected." He can give me all gaps if I ask him, all stocks in an oversold condition, all moving average crossovers, everything a trader could dream of, $kywalker can do it. I thought it was funny given my avatar. So I named it Loot $kywalker. "Loot, I am father!", Like literally though, I coded him. And the best part is that he knows the conditions for my algorithms. So, he can simulate everything I've done on this platform, and he can see the spreads as well. Whereas you can't see them in here. I don't know why this Fawcett guy keeps dragging his feet. Maybe, I should go to Goldman and talk to them, if I don't hear back. This is crazy. Like, at what point do you just get it. You ask us to come on here and build you what amounts to Midas, and then you don't even respond to my emails.

Nice! Just watched your video, so based on the news rss feeds your program will suggest either to buy/sell ?

Correct! Here is the shell code for IB. Here you have full control. You can pretty much do anything. I'll test this against my test account and ensure nothing crazy happens for about 30 days. Then if all is Kosher, I will fully simulate what I've done here on Quantopian by merging the logic into the C# program. Then I'll slap on an interface, and and call it, "The last Jedi!"

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Threading.Tasks;  
using System.Threading;  
using System.Net;  
using System.Net.Sockets;  
using System.IO;

// Use the Interactive Brokers "IBApi"  
using IBApi;

namespace IB_Real_Time_Console_CS  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Samples.EWrapperImpl ibClient = new Samples.EWrapperImpl();  
            ibClient.ClientSocket.eConnect("127.0.0.1", 7496, 0);  
            var reader = new EReader(ibClient.ClientSocket, ibClient.Signal);  
            reader.Start();  
            new Thread(() =>  
            {  
                while (ibClient.ClientSocket.IsConnected())  
                {  
                    ibClient.Signal.waitForSignal();  
                    reader.processMsgs();

                }  
            })  
            { IsBackground = true }.Start();

            while (ibClient.NextOrderId <= 0) { }  
            Contract contract = new Contract();  
            contract.Symbol = "IBM";  
            contract.SecType = "STK";  
            contract.Exchange = "SMART";  
            contract.Currency = "USD";

            List<TagValue> mktDataOptions = new List<TagValue>();  
            ibClient.ClientSocket.reqPositions();


            Console.ReadKey();  
            ibClient.ClientSocket.cancelMktData(1);  
            ibClient.ClientSocket.eDisconnect();


        }  
    }  
}

Since, $kywalker will be voice activated, I can simply code a function to pass the args into the program, saying something like "Buy at the bid", and he will launch the program with the arguments and initiate the trade, and you will literally here IB say "Oder filled" or "Order partially filled", almost like two people talking. Technology is a beautiful thing.

1.1 Million now in the contest. Still no word from Mr. Fawcett. I just looked at the leaderboard. All I see are names like Sky Blue, Jungle Green Buffalo, and Bronze Butterfly. I'm assuming those are aliases. Quantconnect does something similar when you spin up a back test. It says I'm currently in 356th place. Lmao!!! 10% in three days. I had no idea Quantopian entertained such genius. Let's see where we are after a month. At this rate, in this bull market, it will have doubled the total. If I don't win this contest, this site is a total HOAX! The Sharpe on the algo is at 13.33. I'm very interested in their scoring system, which current places me at a 70. Seriously??? I want to pose a question to everyone on this platform. What are the odds that 386 people have created algorithms that have made sums in excess of 1.1 million on 10 million over the course of the contest with a Sharpe of 13.33? My expectation is this should have at least jumped into the top 10, given it's returns. Call me paranoid, but do I sound logical? My spider sense is tingling right now.

www.titlelight.com/images/capture7.jpg

Leo,
At the Singapore Quantcon recently, Delaney Mackenzie was urging people to look at something other than price data, which of course is very good advice, but here was I, wondering just how much benefit could REALLY be derived from using "alternative data"?

Well, you are demonstrating what can potentially be done right now, and its incredible! If people at Quantopian seem a bit slow to respond, I'm quite sure its not at all because they are "hoaxing" you in any way. More likely you have just completely "knocked their sox off" and they are simply speechless at seeing something so amazing! Heartiest congratulations to you on "doing the impossible"!!!

Does your algorithm have any short positions? In capture7.jpg short exposure number is $0.00, is that just temporary figure?
As stated in rules here: https://www.quantopian.com/open/rules

Judging
Your algorithm must be hedged to the market. It should hold both long and short positions simultaneously, or be entirely in cash.

I don't want to divulge what I'm doing in any respect Mikko. And to Tony, I am not bronze butterfly. I just deployed my algo three days ago. It's moved to the middle of the pack. I'm assuming these guys have been running for a bit longer, but I do fully expect to hawk down every single one of these guys. With a Sharpe of almost 14, and a 10% gain in three days on 10 million, at this pace, no way in hell I can see anyone of them winning. What Quantopian should do to prove it is indeed fully transparent, and isn't completely full of horse manure, is print the stats from each algorithm as the contest progresses. I'd be interested to see, who has made more than 1 a million on 10 and in what span of time. Their names aren't printed either. Those are aliases. It says so when you drill in. Either way, I'm working on something much bigger with the IB API. If Fawcett won't give me my allocation, I'm gonna make the money either way. I also have to entertain the thought that some of these guys may actually be that smart. It's not impossible. However, it would be more believable if Quantopian didn't operate in this cloak of secrecy. For all we know, that list may be full of fake names, and simply engineered to have people believe narrative, so they can grab their intellectual property. I understand the aliases. I do not understand why we cannot see, at the very least, the metrics generated by the algorithms, to ensure we are not be lied to or scammed. That doesn't pass the honesty and transparency smell test. The list also hasn't been updated in 20 hours. So a few hours from now, it will register the additional 9%. That may spark the move I'm looking for. We'll see.

I stand corrected. You can see the returns.

They had to use scientific notation to show the returns because the box wasn't big enough, but you won't believe this. Get a load of this....

www.titlelight.com/images/me.jpg
www.titlelight.com/images/leader.jpg - Bronze Butterfly

I'm not going to dare say what I'm thinking. I'll let you do the math.

:-))

Lol. Indeed it will. Long term beta is 0.14. I suppose then it does a daily evaluation and punishes those who capitalize on a bullish market. So huge gains on days when the Market does well, lowers your score. Brilliant logic. We should all code our algorithms then to be conservative with its gains as the DOW climbs to new heights, rather than capitalize on the markets momentum. I guess somehow we deem that conducive to investment goals.

@LW Could you paste this at the end of initialize() and report its last value? I'm hampered not knowing how you are ordering, whether day trades and when leverage was being recorded. If this turns out well it'll be impressive as metrics with only a few data points can be wild while this from a backtest says a great deal. Thanks.

    context.mxlv = 0  
    for i in range(1, 391):  
        schedule_function(mxlv, date_rules.every_day(), time_rules.market_open(minutes=i))

def mxlv(context,data):  
    if context.account.leverage > context.mxlv:  
        context.mxlv = context.account.leverage  
        record(MxLv = context.mxlv)  

It's not that I'd be that interested about your strategy. Rather I'm just highlighting rules as they state you should be hedged or be entirely in cash, and if you aren't hedged or in cash and only hold long positions don't expect to score high in the contest.

Harlequin Sheep makes an important point when he writes: ..... one of the first lessons you will learn as a trader is that you are not entitled to anything. No one owes you a penny in this world. The market has eaten plenty of "geniuses" and will spank you silly if you do not approach with a well-earned humility.

I have a friend named Andrea Unger. He is a very nice person. He is one of the most intelligent people in Europe. He is a trader. He is the only person to have ever won the Word Futures Trading Championship three times in a row. It is a year-long competition, live, with the person using their own money. You can find him on the Internet if you are interested to see a real trader, one of the best-of-the best. When asked in interviews what is the most important characteristic to be a successful trader, Andrea always says exactly the same thing: "Humility". He is a great inspiration to me and a pleasure to be with.

I wish you a comparable level of success in your own trading, but there are other things more important than high returns. Like survival. Good luck!.

Leo Williams is presenting an interesting trading strategy using the same tools and data as everyone else.

That he limits what he is accepting to show is his right. It is how he can protect his intellectual property. After all, a program is just a program, a few thousand lines of code that does not care on which machine it is ran. That said, I have no doubt that what Leo has presented are snapshots of what is on his monitor and I accept that at face value.

What those charts say is that it is possible to generate more alpha than just average. I see his strategy as chasing short-term momentum and catching some of it. The way he does it is his own. And putting it on the table can only say: you can do it too.

Leo, congratulation. Keep posting as this evolves. I like it.

Leo is undoubtedly providing something for many of us to think about... one way or another!!

Guy comments: "Leo Williams is presenting an interesting trading strategy using the same tools and data as everyone else" [has available to them here at Quantopian is implied]. I agree with Guy's comment, although with one slight modification in that Leo is presenting his trading RESULTS but (as to be expected of course) not very much of his trading STRATEGY, other than the following snippets: " The program ...detected an FDA approval", " ...processes thousands of rss feeds and strips out what I've defined for it to detect". That is enough for everyone to get the idea. Beyond that, whether the program is voice activated, or talks or sings opera or whatever, well that's nice I suppose but not really relevant to the bottom line.

Guy continues: "What those charts say is that it is possible to generate more alpha than just average. I see his strategy as chasing short-term momentum and catching some of it. The way he does it is his own. And putting it on the table can only say: you can do it too".

Yes, I wholeheartedly agree with that and, whatever else one may think / feel / believe about this series of posts and its "interesting" originator, I for one now feel inspired to start thinking very seriously about the potential of alternative data!

So, along with Guy, I also encourage you to keep posting Leo.

Follow the bronze butterfly Daniel San. He knows the way to the 1%! Listen to Mr. Sheep and build a mobile home of very heavy, dense metal.

Thanks Tony. I appreciate the support. I also see the case than can be made for Bronze Butterfly. I think it all boils down to risk appetite. However, I think there is something missing from the back testing that should factored in that is not. A while back I wrote an algorithm based on Benjamin Grahams fundamental formulas that did pretty well. I did this by calculating the intrinsic values of stocks that met Graham's criteria, buying those that were undervalued, and selling at the price target, or if the underlying fundamentals changed. In reading much of what Buffet Stated, he factors in INFLATION into to his investment strategy. He looks to make 10% on his investment, but factors in inflation at 5%. Let us further examine this equation. If we start with 10 million, and it just sits there, it's essentially worth 995k, after the first year. If you compound this over seven years, it is now worth $6,983,372, in terms of today's current buying power. You've essentially lost 30%. I think that Quantopian should factor inflation into their back testing results, because if you take the 1.5%, even with the low risk of Mr. Sheeps algo, you are losing 3.5% per year in buying power. When you compare than to a 59% return, inflation subtracted, with a higher Sharpe, and zero losses during market crashes, I think it's safe to say, my score should be 100! By all means, hedge away! And yes, you CAN win the Indy 500 on a rusty armored bicycle. Anything is possible.

Hi Leo,
Yep, sure, Buffet is living testimony to the fact that Graham's stuff works OK, at least when the market transitions to "weighing machine" mode from its more common manic "voting machine" mode, and one has the patience to actually wait for that, like Buffett & Munger do. Your point about inflation is of course correct and becomes important in any long-term venture. Yes, I agree that beating inflation is a better minimum-returns criterion than 0%. In your case however, your returns are SOOOOO far ahead of inflation that it shouldn't matter to you whether inflation-adjustment is used or not. Congratulations on that part. Enormous wealth will surely be yours .... as long as you don't blow your account out of the water along the way. Just watch out for dangerous rocks, sharks & drawdowns !!! :-) Cheers, best wishes.

How did the algo fair today?

Here are today's stats.

Returns: 11.04% Dollar P/L: $1,104,101.28 Sharpe: 11.67 Rusty Armored Bicycles: 0

And guys, I am a trader. I've been trading for almost three years now. I initially lost 12,000, which wasn't much, but I believed that with time I would learn to become a better trader, and financial freedom was what drew me to trading. I am now a profitable trader who leverages both fundamental and technical analysis. I do not consider myself an expert. However, the strategies I've developed are currently allowing me to beat the market. I've made almost 2,000 this week on 10K in IB. I do not believe that you can write good algorithms if you haven't had some experience as a trader. I also do not believe you can be reckless in your algorithms, but there are different ways to achieve the same goals. That being said, this platform has many shortfalls, as awesome as it is. We can't see spreads, like five cent tick stocks. We can't trade pre-market, or post-market, which is usually the genesis of big moves. I am going to continue to grow my account as a trader because I trade sensibly, not with reckless abandon. You have to have a system. You need to calculate your risks prior to making moves, and make moves that make sense. And NO the market is not your friend. Put a stop loss on a chart with everyone else and watch the Market Maker spike the price and stop you out. Use hot keys instead. And No, price does not move in accordance with supply and demand. It moves in the interest of the Market Makers who capitalize on the spread, and will accumulate orders at a price level for greater profit at a higher. That's why you need level II to gauge price direction. Some scenarios are also very predictable if you know what to look for. Huge buy orders at a price level, and major short selling volume results in a price explosion to the upside, because when short sellers cover, it results in a buy order. You can see if there are shares available to short in IB and you can see the volume at a particular price. It's just math folks. That's all it is. Remember, the Market is always right, not your ego. There is a saying in trading that I believe is very true. Pigs get fat. Hogs get slaughtered. Know when to hold em. Know when to fold em!

How crazy L. I've been trading roughly three years now. Started with a retail account. Lost @$12,000, and then moved to paper trading. I was also drawn in because I saw a path out of poverty laid out before me as soon as I saw that first candlestick chart. Money, analytics, and mathematics have always been some of my favorite things. I've developed my own position sizing strategy for my manual active trading. It requires knowing support/resistance, account value, and uses a % risk model to calculate entry and exit points. Risk management is very important! I now work at a trade desk for over a year (In an operational capacity.. Nothing glamorous.), have gotten my 7, working on my 66, and am waiting for my NEW retail account to open. I'll be funding it shortly. I wish you luck man.

Leo, forget about "sick desperate losers". If anyone really is actually hacking your machine now, then its unlikely to be just some jealous script-kiddie. You have been very actively promoting yourself as a genius who can make BILLIONS$$!! Surely you don't imagine that you haven't already attracted the attention of some nasty international players, possibly including less-than-totally-friendly governments and criminal organizations. The sort of people that I personally do not even want to think about, much less talk about. I keep politely suggesting to you that you think carefully about the implications and possible consequences of your behavior and your actions. Best wishes to you, from Tony.

You're right Tony. How do I delete this thread?

It's clear now with beta of 42 for multiple days, this is simply another case of hidden margin.

@LW Could you paste this at the end of initialize() and report its last value?

def initialize(context):

    ...

    context.mxlv = 0  
    for i in range(1, 391):  
        schedule_function(mxlv, date_rules.every_day(), time_rules.market_open(minutes=i))

def mxlv(context, data):  
    if context.account.leverage > context.mxlv:  
        context.mxlv = context.account.leverage  
        record(MxLv = context.mxlv)  

In a June LW post, he was rightfully asking for help on runaway leverage. I provided this solution and the returns went from a peak of 43000% to 226%.

It is not easy to expose margin. One cannot simply do a once-per-day leverage record. For example, opening positions early, closing them near market close, then recording leverage at end of day (presuming none unfilled), leverage will always show zero, but that is not zero invested. (As in the backtest below where leverage shows 0. Returns by the way appear to be 92%, are only 10% on the amount invested with margin accounted for)

Recording cash once per day is the same problem.

It is easy to presume leverage is fine when it isn't.
The only way to know is to keep track of maximum leverage every minute every day. That's the mxlv code above, a better version of this.

A third trace in the main chart, margin, would avoid these things but I don't know how easy or difficult that would be.

Clone Algorithm
113
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 59ea6cb07c00694017c54fb0
There was a runtime error.

The Beta is not 42, and you don't know what you're talking about. Margin never exceeds one period. End of story. Margin is one of the things I print on a daily basis in addition to the wins and losses, and I manage margin through a function I wrote to ensure that. I would strongly recommend that you worry about your own algo. If it was what you say it is, why would you be concerned anyway. In addition, I would ask that you please stop sending me stupid trolling emails. Find something constructive to do with your time. I am not interested in entertaining any more conversations with you. I just finished securing my computer and I've already copywritten my algorithms. Also, when I detected that program running last night, immediately as soon as I disabled it, I got an email from a Gary Hawkins, saying exactly the same nonsense you are saying, word for word. So, let me be emphatically clear. I don't know who hacked my computer, or what they were or were not able to obtain, but I'm looking into that as we speak. I began running netstat and piping the output to a file the minute I became suspicious. So I can trace route the IP's, to see where they lead, and when I find out where it was, I will be submitting that information to the authorities. If you think I'm going to let some Kazakhstan goat farmer, steal from me, think again. Secondly, I'm NOT dropping out of this contest, because if someone did indeed steal my intellectual property, this is likely where they would seek to post it in order to obtain an allocation. So, it would be conducive to their diabolical goals to get me to drop out, in order to submit my work. So, that's not going to happen. Again, do NOT email me anymore. I'm not telling you my beta, but it sure as hell isn't 42. I'm not going to provide one shred of additional information to anyone. Like Tony said. There are some really sick people in this world, who do nothing more than waste precious oxygen. And they will do anything to leach off other people's success.

Ah you're right, beta is 7.55 now, meanwhile think of what a pleasure it would be to prove me wrong by pasting that code in your algo.

Unfortunately, I cannot give you any additional insight. You will just have to go with your gut. I just back tested and validated that your assertions were emphatically false. With respect to beta as a point of argument, it simply means that I'm outperforming the market, even when it's doing well. 1.1 milllion on 10 million in three days will do that. Over on the right, you can see the back test returns, the stats you were referring to. The beta there is listed at:

BETA
How connected your algorithm is to swings in the value of SPY. Closer to zero is better.
0.1410

That is far in excess of what is required to win this contest, particularly when you couple that with a Sharpe, currently, in double digits in conjunction with the highest returns on the entire list. Yoda was indeed right. Listen to Yoda. He knows the way to the force.

Here is a snapshot of leverage Gary. Now, please, I do not want to hear anymore of this foolishness. Again, it will NEVER exceed one. I ensure that it never does.

www.titlelight.com/images/silencioporfavor.jpg

Three words to live by:

OUT OF SAMPLE

Thanks Blue for your neat bit of code to discover hidden margin & runaway leverage. I will use it, even though I know I don't need to.

I'm just a dumb ol' injuneer who can barely even write pyfon, let alone even figure out how to do anything tricky in my algos.

Leo, don't worry about deleting this thread. People at Quantopian are not going to hurt you, but it might be wise for you to be discreet about what you send out to the whole world on YouTube.

Best wishes to all real traders from kindly old uncle Tony (who has been pottering away at this since before many of you were even born).

Oh, and by the way, trading for 3 years means that you have never actually experienced "adverse market conditions" yet, so beware!

You are entitled to your opinion, even in the face of the facts. Likewise, I am equally entitled to disregard it completely. If Quantopian's back testing can't simulate real trading as you say, then by what metric do we judge your algorithm, and what would be the point of this experiment. Something is unrealistic, because "you" say it is? That is the metric that we should judge ideas by that outperform yours? I suppose as long as we achieve meager hedged returns, the back testing engine works fine. How convenient for you that would be. Best of luck to you Mr. Sheep. Unfortunately, there are only wolves on wall street. And judging by your name, and your fervent denial of reality, you're incapable of thinking like one. Good luck with inflation. I suppose the hedge fund managers you referenced don't incorporate those statistics into their thinking.

Thanks again Tony. However, my algorithm outperforms the market even in adverse conditions. 207% between 2007 and 2009. I posted those images earlier. It should do fine in any market with an overall beta of 0.14.

www.titlelight.com/images/silencioporfavor.jpg

That was a screenshot of your own record line, not my code.

Again, it will NEVER exceed one. I ensure that it never does.

You've been around here less than a year, easy to miss certain things.

Run my MxLv code, post screenshot, done.

Hey Harlequin, where can you see the results of past contests?

Awesome. So I take it then you've received an allocation for your work? How did that work out? Or did they give you T-shirt?

Here at Quantopian we work very hard to maintain a polite, cordial, and welcoming community. We welcome strong opinions and healthy debate. However, in our view, too many online forums (financial and otherwise) turn into angry, impolite, and unproductive messes.

This thread has slid outside of our preferred tone, and outside of our acceptable tone.

I'm closing this thread. No further posts will be permitted here. Please let the tone close here, and do not take it to any other threads.

Thank you for your kind understanding. Help us keep Quantopian a friendly and welcoming community.