my journal

Status
Not open for further replies.
Money Management functions on my Excel WorkBook

Now. I don't want the CL accident to happen again, whereby I build up my capital for a month, and then trade the wrong system and lose half of my capital in two days. I avoid that through money management. I implement my money management through a bunch of functions on one specific sheet of my excel workbook running all 37 systems, soon to be 46.

With this amount of systems I need to automate everything. I can't just select the number of contracts to trade manually, and which systems to trade. The second reason to automate everything is that by being greedy one day I may allow the CL to trade (like I did), and accidents will happen. I will avoid such risks, by creating effective functions that will always take care of everything - not just trades, but also contracts traded and whether the system will have trade any contracts at all.

This is the structure so far of my money management sheet:

1) FINISHED: Contract Liquidity filter (at the moment unused): you cannot start a trade where you buy 500 contracts if that will drive prices so high that you won't make any money from your trade. So, once I'll have a lot of capital, I will need to implement a much better system which will split my trades at different moments. At the moment I have a (non-used) filter that limits the contracts traded according to how liquid that market is. Not used because I am lucky if I can afford 1 contract. On the other hand, at least it's one less problem to deal with.

2) FINISHED: Available Funds filter. This is simple: if the money is not there, then you cannot place a trade, whether it makes sense to do it or not. Also, though: if the money is there for a given future contract, but you will open a position that will need twice as much margin during its lifetime (because it's an overnight trade), and you don't have that much (overnight) margin, then you can't trade it either, because that position (or another one) will be closed by the broker when the normal full margin will resume, and that will screw up your trading of course.

3) IT MAY NEED WORK: ROA filter. This and #4 are the really important filters, that I need to work on or at least think about, to automate them completely.
This filter works like this. It decides how much of your capital is allocated to each system according to its Return On Account profitability (and then it divides that money by the contracts it can buy, margin-wise). The ROA profitability gets calculated by using in the numerator the gain of the system in the past 3 months of forward testing (and this is a big limit, because I don't have enough testing for some systems, but it's the only measurement I can trust). Ok so, despite all its limits, you figure that out and keep that on the numerator of your fraction. On the denominator you place the sum of the margin needed + the largest drawdown incurred, not of the past 3 forward testing months, but of the whole ten years tested, just to be on the safe side. This is how you get the ROA profitability.

For example, the ROA profitability for my best system is 133%. How do I get a number of contracts to trade from that figure? I first have to decide how much capital my best system will be allowed to use. I set it to 50%. Then I divide 133% by the system with the best ROA profitability value, which in this case is the best system itself, with, again, 133%, and I get a result of 1, or 100%, value. Then I multiply that by the highest % of capital I am allowing the best system to trade (50%): so 100% (because it happens to be the best system) gets multiplied by 50%, and I get 50%. So my best system will be allowed to invest 50% of capital. Which will then be divided by the margin needed per contract, and return the number of contracts that (ROA-based) money management has decided to trade.

Now, if the function were returning an 80% ROA return, we'd divide 80% by 133%, returning 60%. And then 60% would be multiplied by 50%. So you can invest 30% of capital on a system returning a ROA ratio of 80% (vs. margin+dd) in those 3 months of forward testing.

This formula like the other one below (#4) has a limited-capital problem (in that it starts working properly with a capital above 30k), but there's a problem related to the few months of forward testing that I have. How can I measure correctly the profitability a newly created system that only has a few weeks of forward testing? I can't. On the other hand it also makes sense not to trade a system that only has a few weeks of forward testing, so this could actually be the solution of a potential recklessness on my part.

4) IT MAY NEED WORK: Potential Drawdown filter. This filter is one that I disregarded (disabling the formula for it) as far as the CL. The CL performed great but it had a potentially high drawdown, but I decided to not care about it. Consequence was that I made a lot of money in the first week, and lost even more on the second week (because I got unlucky), in just 2 days. It works like this: how much of your total risk capital are you willing to lose if your system incurred the worst drawdown on its first trade? 50%? Then you divide your capital by the drawdown and multiply it by 50%, and you get the contracts you can trade for that system/future. Say you have a capital of 10k and your CL system has a drawdown of 10k. Capital/dd returns 1, and 1*50% = 0.5. That means you can only trade 1 contract when you have 20k. This function is just about perfect, except that I will need more capital to see it work properly, because right now I am allowing many systems to trade with a potential loss of 50%, which is too much, but which is necessary given my very small capital.


SUMMARY

Ok, so let's try to recapitulate what I need to work on. #1 and #2 are ok. #4 is logically perfect and so there's nothing I can change in the formula. I should just leave #4 as it is, and try, as I increase capital and accordingly increase the number of contracts traded (and, with time, created), to decrease as much as possible the % of capital risked per system, should each system incur its worst drawdown.

#3 may need work or it may not. Right now it calculates which system deserves more capital. Its problems are that even though a given system may seem awesome, diversification is good in itself, so it should allow systems making less money to trade more than they deserve to, in order to encourage diversification. Yet, without going as far as allowing all systems to trade the same number of contracts. Now the big dilemma remaining is actually two dilemmas:
1) simple formula without encouraging diversification in any way or more complex excel function (a series of functions) in order to encourage diversification? Complex functions are not good in my opinion, because I suck at formulas and I may lose touch with what I am doing.
2) Good formulas and no trading at the start due to lack of forward testing profits? Or bad formulas and a lot of trading allowed, regardless of actually made profits, and in order to maximise the exploitation of opportunities?


CONCLUSION

1) Overall, I've found that the most important thing is automation and non-tampering (and tampering is the reason that I still have 10k instead of 1 million).

2) Formulas that may allow little trading and little opportunities now will work properly in the future, so I should implement them from the start, even though this may mean a slower rise in my capital. I should quit this habit of disabling my formulas to allow more systems to trade with a small capital.

3) Also, I am deciding one more time that I am not going to implement more complex formulas encouraging diversification by allowing and favoring the trading of less performing systems. If a system has not produced great profits vs. its drawdown and margin required, it should just be left alone.

Ultimately, during the weekend, I'll implement all final formulas that will stick to all the way to the end. No more disabling of formulas. And no complex formulas either. If anything, let's sacrifice the quantity of systems trading. If they don't pass the formula test, they will not trade, because it means they are not good enough. Only this way I will need no tampering of any sort as my capital will increase.
 
Last edited:
Ok, so. The situation is not too good for two reasons. First of all my roommate and I were told today that we'll have to move out of our great room next week and move in with everyone else from our unit. We were quite depressed about that. So I came home hoping for some good news from the markets, and instead I found that I had just lost about 200 dollars on the EUR. Ok, so I guess I need to remind myself that the only good news is that today I celebrate one month without tampering with my systems. Also, a good move I made is, as soon as he told us about the room change, I told my boss that if I move out of my little room, then I will also ask for more of a part-time status, and ask to work from 9 am to 13.00. And he seemed to accept it somewhat even though he told me "you will be needing to focus more", "you won't be able to take any breaks"... and I said ok, but that if I had to work in such a bad environment (with the radio guy again), I would need to work for fewer hours, but that ultimately I'd be ok with working only 5 hours a day, even surrounded by noise, distraction and so on. And I asked him if the moron was keeping his radio on or not, and he said he hasn't been doing it lately. I hope it's true.
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    7.8 KB · Views: 138
Big big temptation to go LONG on the GBP right now and not tell you guys. But I can't betray you. That little extra caring from you, added to my own caring, is what stopped me from going LONG on the GBP right now. I do believe it's a good trade, but I am not going for it just to preserve my habit of not tampering. Because even though this one might be a good trade (I would feel like going LONG with everything I have), tomorrow discretionary trading would punish me as usual. And also from today on, I'd be in a frenzy to look for potential trades, whereas if I just don't trade, then I'll be relaxed all the time.
 
HOLD ME!!! HOLD ME!!! TIE ME!!!! GREAT OPPORTUNITY!!!

I am not going to seize it just because today I am celebrating one month of non-tampering and I can't celebrate it by tampering.

GBP HIGHLY OVERSOLD!!! IF you are a tamperer you should go LONG on it!!!
 
Someone please go LONG on the GBP for me. I can't do it unfortunately. You do it for me.
 
I'll go for a bath before the irreparable happens. When I'll come back in an hour hopefully the opportunity won't be there anymore. I will have blown an opportunity and saved myself from relapsing into discretionary trading.

I will then either watch a movie or work on the opening gap system. Today I've lost money, was told I'll have to move out of awesome room... I really can't afford to relapse into discretionary trading. Damn... it's so hard to resist. Please everyone go LONG on the GBP for me, since I cannot do it. You will make 600 dollars per contract guaranteed within the next few hours.
 
**** it. I've done it. I am sorry to disappoint you all. I've entered with 6 contracts. That's cause i didn't go to take that bath.
 
All right. It went all right. I'm probably going to make a few hundreds by the time I'll have to close the 4 remaining positions (margin call on 2 of them already), in order to let my systems trade (right now everything is flat).

How happy do I feel about the gain? Zero. I just did it because I felt the irresistible urge to break a rule I had created myself. If I have to go to work on time, occasionally I'll feel the urge to go late. If I'm into the good habit of going to bed early, occasionally I'll have to stay up late, to feel that I am actually free to choose. Being fed too many rules by my dad as I grew up made me permanently allergic to rules, any type of rules, even those I create. Now hopefully it won't happen for another month, because - as I don't conceive nor can apply any stoploss whatsoever - each time I risk blowing out my account (and that's why I always pick tops and bottoms, because it MUST be the top or bottom, since I won't get out in any case).

Anyway, I was wrong: I am actually losing money right now on that position. Hey, this is me, for better and for worse. I feel bad, but I had to do it. Sorry to disappoint you.
 

Attachments

  • Snap2.jpg
    Snap2.jpg
    13.7 KB · Views: 148
And since I am losing money, guess what's next. Holding on to my position like you hang on to a raft in the middle of the ocean. Now I'll hang on to it until it gives me what I deserve. About 500 dollars. I am not letting it go any sooner than that. Regardless of anything my systems want to do with the capital I am using up.
 
Guess what now. The ES wants to go down, but the GBP still rises: very very bullish signal for the GBP. So "of course I was right", I am now saying to myself. "How could I ever be wrong?". The first step to blowing out your account.

However, after looking at it again and again (while praying), I have to say the GBP wants to rise really bad, despite the ES trying to hold it back. But pretty soon it will be the ES's turn to rise, and then the GBP will rise like crazy.
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    13.2 KB · Views: 138
That's it, it's happening right now. The GBP from all charts looks like a ball that's been bouncing down the stairs all day long, and has finally reached the bottom floor and stopped bouncing.

Now I'll just have to go watch tv for half an hour, and when I'll come back I'll post my gain of 500. Hopefully.
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    126.5 KB · Views: 154
Last edited:
By the way, my eyes are now wide open from the excitement I am feeling, and have been wide open since I opened my discretionary trade, like they haven't been in a whole month of automated trading.

Come on, GBP, you know you want to go up. Come on. Do it for me. Give me what I deserve...

Eyes wide open with despair right now. Looking at that -16 from open positions.
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    14.2 KB · Views: 151
Still staring, with my eyes wide open, and praying. Staring and praying. Staring and praying. My back hurting from the uncomfortable chair I am using. Despair. Position is getting worse. But how much worse can it get? It's the end of the day and it's touched bottom already.
 
Staring and praying... I am ****ed. I am going to close my position in a few minutes, with a gain of a few hundred dollars. Regardless of the gain, I am not going to carry it into overnight. Feeling a lot of pressure right now. Eyes wide open, like Michael at the restaurant with Sollozzo.

 
Ok, this is it. My ordeal is over. I've actually made 72 dollars, but I've felt guilty, I've had a heartache. I wasted hours. And I've missed one automated trade due to my capital being all used up. Overall, a really negative experience, as usual. Also, it proved I was wrong: the GBP didn't rise that much. One tenth of what I expected it to rise. Only: I could not resist the urge of breaking my rule. This is how I am, for better or for worse. For worse I guess.

Today's problem was not that I made 72 dollars. Actually it was: I broke my non-tampering rule and I got away with it. Next time it will be so much easier to break it. And sooner than later I will not get away with it. Because the floor that today looked like a bottom, next time will be a floor as strong as paper. And I will not make 72. I will lose 2000. Today I put my whole capital at risk on one trade, and without a stoploss. That's what I did.

I am still as irreponsible as I was 12 years ago, when I lost the money my boss and the computer guy had given me. I am not capable of handling my money like an investment fund would, with responsibility. That's why I am not accepting anyone's capital but mine, since many years ago. I can't trust myself. And nobody should trust me.
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    15.9 KB · Views: 166
Last edited:
Up again. Now I'll work on those systems. I'm ok. I am feeling bad about the relapse, but good about the fact that I went to bed so early. As usual this weekend the good side of me will work and will achieve a lot.

In the meanwhile, that friend of mine, whom I had offered to give money to if he had learned to be profitable and shown me 3 months of profitable trading, gave up. At least momentarily. He kept trading for August, September and part of October, and now he's not trading any more. Throughout his trading efforts, he kept asking me to do a lot of testing for him and assist him in various ways and that was ok. But then he even asked me to give him my systems or to implement some systems for him, but since he's computer illiterate, that would have meant that I would have had to help him out my entire life, and increasingly. So I told him "wait a minute: we started that I'd give you capital, and now you want my systems, or you want me to create systems for you which would mean assisting you my entire life? We got ahead of ourselves...". Then I told him that I would only do what I promised at the start, and to stop asking more and more.

He then continued to paper trade for a few weeks, but unsuccessfully and now he quit altogether. He's not a quitter, but if trying his best means that I have to do half or more of his work, then I prefer that he quits. His last email to me said "are you mad?". And I replied "I am not mad at all. The problem is that you make me work too much". He's been asking of me increasing amounts work, and since the only way to not be asked to work so much, is to not call him, then I've stopped calling him.

I hoped and thought he'd be able to learn a way to trade discretionary and profitably, even though I never managed to do so myself. I had hoped he'd learn and teach me something in the process.

But then he understood that systems were better, and he wanted the systems. Sure we are friends, but at that point what was I going to gain from it? Zero. We got to a point that was ridiculous even for friends. Little by little, he increased his demands, and if I hadn't said no, he would have had that I gave him capital, I created systems for him, and I assisted him for his lifetime with such systems. So basically I would have done everything for him. Very polite and nice friend, but I am not that generous. Actually, among the other things, I did write to him that I couldn't accept the deal he offered me because, I couldn't help but feeling exploited. At that point it would have been easier for me to just wire him money (because at least I would have kept my systems to myself).
 
Last edited:
You do a lot of writing, Travis, and I admit that I have to scan your post first and decide whether to reread that post again. I do appreciate and enjoy reading you, though, I want you to know that. It is a unique journal.

I'm glad that you are getting your friend sorted out.

Split
 
I will answer as I read, as usual.

Thank you. I am very glad to know that you are reading me and even re-reading me. I write so much first of all because I enjoy writing. And second of all to scare superficial people away. But I have to admit: it looks like there's none around here, and let me tell you: it feels really good.

Wow, and now you're saying "appreciate", "enjoy" and "unique journal". Thanks, thanks, thanks. It feels really good to be told I am good at something. And this journal feels good to write, regardless of others liking it or not, and I think this could contribute to it being good. I enjoy thinking out loud.

The recipe is first of all to be able to type as fast as the ideas come out of your mind. Or if you can't, maybe slow down the speed at which your ideas come out of your mind. This way I tend to follow a logical path. People can follow my train of thought. Of course another major ingredient is sincerity. You can't let people follow your train of thought if you skip thoughts because you have to hide them. Another important ingredient is to keep everything simple, so it will further add to the comprehensibility of what I write. Maybe the fact that English is not my native language helps me keep things simple - just because I wouldn't be able to express everything at a more advanced English level, I don't even try and keep everything evenly simple.


http://en.wikipedia.org/wiki/Satie


http://en.wikipedia.org/wiki/Being_There
http://en.wikipedia.org/wiki/Peter_Sellers
http://en.wikipedia.org/wiki/Hal_Ashby
http://www.letmewatchthis.com/movie-1075-Being-There
 
Last edited:
I will answer as I read, as usual.

Thank you. ]

Not at all. The way that your mind works is nothing new--different, of course, because none of us are the same-- but we all have problems that occupy our minds. Most of the posters, here, are looking for practical ideas that will get them out of the poor house. What is new, in your case, is that you tell us about your attitude to life, in general, not of the same, old, mundane trading problems. Enough is said about them, in other threads, already.

Good trading, by the way. :)
 
Hello everyone, again.

I've updated the forward testing maximum drawdown for all systems, because they change every week, and I haven't found a way to automate this part on excel (the sum of all negative days, so to get the biggest drawdown by summing up the series of the worst trading days).

Then I fixed the money management formulas I spoke about yesterday. Unfortunately all formulas are going to be permanent but one: the money management formula (#3 in post above) was weighted by allowing some of the less performing systems to trade, because otherwise, with the little capital I have, only 3 systems (the best ones) would have traded. I will revert those formulas to normal and permanent once I reach 20k of capital.

Now I am developing, as I said I would, that system on the opening gap. This time I won't share any of the code because someone has helped me and I can't share his ideas without his consent. Besides, usually, when I get too far into the code, I stop sharing it anyway. But I would like to share my problems... Wow, that sounded pretty selfish: I won't share the good things, but I will only share the problems. Well, to a degree we're all selfish. Otherwise I wouldn't be alive. I am more selfish than a missionary, or else I'd be in Africa, too, by now. So, anyway, let me share with you my problems, as usual.

The problem is that I am testing this system on tradestation, with all its qualities and limits. Flexibility is its quality, and its deficiency is also flexibility, because I have to configure pretty much everything, from data configuration (the hardest part of tradestation is getting it to read your data correctly, with all the different timeframes and date formats) to code configuration, to timezone used. I suppose the newer version of tradestation might have solved a lot of the problems I am having, but I won't buy it. Hey, maybe that is the quality of this journal: that it is exactly a journal in fact, in that I continuously keep you updated on where I'm at and what I am doing and thinking. While I do it, I also explain to myself where I'm at, so the process is not boring nor useless.

Anyway, the problem with tradestation, or rather, with data, in this case, is that I am building a system on the opening gap, which requires knowing today's open and yesterday's close, and I am having problems telling tradestation what exactly is yesterday's close.

Indeed, "closed(1)" for tradestation is literally the close of yesterday, the end of yesterday: it's the last close during the 24 hours of yesterday's trading, the close at 11.45 PM EST (I use 15-minute timeframe).

On the other hand, for stocks, stock indexes, and even futures (to a degree), and for all broker's platforms trading them, yesterday's close always coincides with 4 PM EST (the session ends a little bit later for most futures). In fact, I just realized that all the systems I built that use yesterday's close, are screwed up as a consequence. Yes, I just realized that 20 of my 37 systems are wrong. Because they are tested as if yesterday's close was 11.45 PM EST, but they are traded as if yesterday's close was 4 PM EST. And that is 8 hours of difference. It's a wonder how they can work so well despite this huge mistake on my part.

The reason could be that, let me see on the chart... yes, in those 8 hours after 4 PM EST, the markets don't move that much. It's a very tight range. Let me see more of it on the chart. Yes. There might be some exceptions, but overall I can just disregard this "little" detail. The fact that I've built over 20 systems on a close that actually takes place 8 hours earlier!

I just wrote a note to myself in my excel workbook:
closed(1) problem: In dozens of systems you use yesterday's close that for tradestation on 15-min DT (future) data means 11.45 PM EST, but for your trading means 4 PM EST. This error incredibly does not constitute a problem in that during those 8 hours markets do not move very much. However, it'd be best to fix this problem, but I don't see how.

Anyway. Now that i can stop caring about this problem for my other systems, I wonder if I can just consider yesterday's close the close happening 8 hours later. The problem is that for the opening gap system this detail is of major importance, as the whole system is based on it. BUT. But if I can't fix it for the other systems, I don't see how I could fix it for this system, or was I being lazy and it can in fact be fixed, and then I'll have to do all my testing (on dozens of systems) all over again? And that of course would be a nightmare...

Ok, so: on the broker's side, it most definitely cannot and should not be fixed, because it can't be fixed and because the real error is the one by tradestation. Now, how can I fix this on tradestation. To think about this, I need to stop writing and go for a walk (within my house).

Ok, here's what I came up with:

1) the maid is a whore because she didn't show up yesterday

2) the "closed problem" would not be a problem if I was doing my testing on stocks and stock indexes, instead of futures - but I cannot change that, because I need the 24 hour data of futures

3) everyone testing on futures and using "closed" has the same problem and maybe doesn't even realize it

4) BUT. But "closed" is just a tradestation function and it can be changed or a new one could be created: EXCEPT. Except I am not a good enough programmer to be doing so and reliably so. I will work on it once I got capital and I quit my job (not enough CPU in my head to work at the bank and create tradestation functions).

5) "closed" is of major importance for an opening gap system, but as I said in those first 8 hours markets barely move at all, as the Europeans are sleeping, and the Americans have closed the day trading session. It's the following 8 hours that see all the action.

Conclusion: I will not change "closed" and I will just ignore its problem period, even for the opening gap system, because it'd be too much work (creating a new tradestation function), and because markets in those 8 hours just screw around.

Anyway, now I was feeling guilty for not doing something I should do: changing the function, so I change the note I had written to myself on my excel workbook:

closed(1) problem: In dozens of systems you use yesterday's close that for tradestation on 15-min DT (future) data means 11.45 PM EST, but for your trading means 4 PM EST. This error incredibly does not constitute a problem in that during those 8 hours markets do not move very much. However, it'd be best to fix this problem, but it requires changing the tradestation function, and I don't have the skills, energy or patience now.

For the enjoyment of everyone, this the function that I should modify, in order to tell it to consider NOT the close at the end of the 24 hour day, but the close at 4 PM (assuming the data is EST):

Code:
Inputs: DaysAgo(Numeric);
Array: CloseArray[50](-1);

If DataCompression < 2 Then Begin
	If Date > Date[1] Then Begin
		For Value1 = 50 DownTo 1 Begin
			CloseArray[Value1] = CloseArray[Value1-1];
		End;
		CloseArray[0] = Close[1];
	End;
	If DaysAgo <= 50 AND DaysAgo > 0 Then 
		CloseD = CloseArray[DaysAgo - 1];
	If DaysAgo = 0 Then 
		CloseD = Close;
End;

{Forcing the function to series}
Value1 = CloseD[1];

Well, right now my brain cannot take this much, so let's move on. Let's move on. Let's move on. I'll continue in the next post, because this is getting too long, and I don't want to risk losing it.
 
Last edited:
Status
Not open for further replies.
Top