Tag Archives: experimental

Back to Linux for experimental live trading

Back to Linux for experimental live trading

I just installed Lubuntu on a new virtual machine within VMWare. Let’s see where this goes.

Lubuntu not for me. Trying CentOS 7 so far so good with the install on VMWare Workstation.

Join my FREE newsletter for my adventures in Linux

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Initial Deutsche Bank FX strategy aka dBFXstrategy open source experimental project with source code on Source Forge

Initial Deutsche Bank FX strategy open source experimental project with source code on Source Forge

UPDATE: Please find these files on GitHub not SourceForget so files links listed below

 

This is what I typed on the README file so please be gentle when giving feedback. This is an entire learning process:

 

Join my FREE newsletter to learn more about this project

 

—-

This history:

I have spent many years looking at various technical trading platforms and trading components as in charting, etc. Now is the time to actually code a real world trading strategy so I intend to use this as a roll model to generate these trading ideas. I am hoping these trading ideas will involve quant analysis.

To start:

Use the PDF from http://stats.lse.ac.uk/kalogeropoulos/LD_1103.pdf#sthash.zOxvHOUY.dpuf as a reference. No comments or further support will be provided once my workflow goal is complete. See below for these workflow details.

Rationale of this project:

There will be more wrong than right in this project as it is strictly for learning to reverse engineer a real world research paper from the banking industry. This is not to include items like charting or trading execution. I am not interested in the performance of this strategy either. As a result, I keep critics, haters, and trolls at bay. This is just to keep this process transparent no different than using an open source software project model. I just hope people will contribute to make this project/process better and even correct. If you fork this, please let me know so I can further learn from your work.

Why Mupad and Matlab for myself?

I find these tools make me more productive and get ideas coded faster as compared to open source language alternatives. This is not to be a technical flame war but this is just a personal preference. I can also extend Matlab scripts faster into other languages (i.e. Java, ..NET, Excel, C, C++, HDL) fastest via Simulink and Matlab Builder tools. Do searches for my research on these tools at https://quantlabs.net/blog/ or https://www.youtube.com/user/quantlabs

I am also using this project as a test to my trading idea research workflow of:

https://quantlabs.net/blog/2014/05/new-visual-and-rapid-workflow-from-db-forex-trading-strategy-to-matlab-to-c-c-or-fpga-for-lowerst-latency-hft-deployment/

As a result, I am trying to ‘rapidly’ generate an algorithm with Mupad, generate custom M scripts, and implement into a systematic model with Simulink and Stateflow tools. Once complete, further code can be generated to C++, C, or even HDL (for potential FPGA deployment e.g. Verilog)

Where do go from here ?

Once I can deploy a trading model/strategy into C++ or C, I can generate Dynamic Linked Libraries (DLLs) or libraries into my various trading components I have at http://quantlabs.net/academy/ via my courses and memberships.

The files

The initial file package version includes my experimental Mupad Notebooks with generated Matlab M functions. These are definitely incomplete but will be updated as I correct them. There are 5 subfolders based on the Theories explained in the reference PDF from Deutsche Bank. I have also included note files for each folder.

I hope this helps everyone and including myself,

Thanks Bryan

QuantLabs.net

Download the original project files DIRECTLY  here deutsche bank fx

I have not submitted any files to SourceForget but I did submit to GitHub (surprise how much easier it is with their new GUI tool): https://github.com/quantlabs/db-fx-strategy

SourceForge project at: https://sourceforge.net/projects/db-fx-strategy/

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quant analytics: good ways to test experimental automated trading systems – preferably, using a distribution-free technique ie. permutation tests

Any ideas on some good ways to test experimental automated trading systems – preferably, using a distribution-free technique (e.g. permutation tests) ?.

——

I wonder what are u want to test? What is the hypothesis?

—–

is your question about technical side — which platform/software to use, or about testing methodologies?

—–

As in optimization, or robustness evaluation?

—–

I am primarily interested in the statistical evaluation methodologies that one uses to test the validity or (statistical) “significance” of a trading rule. A monte carlo approach ostensibly, seems like a sensible approach – (typically, an MC approach involves generating a random TS and testing the rule on the series) however, my trading rules are not based directly off a financial time series, so it is difficult to see how monte carlo framework fits in my particular case.

The question then remains, how to test a rule in a robust way – so that one can ascertain that success (or otherwise) is not due to random events.

——

first of all I would suggest considering if the amount of data used in the test is statistically significant. That is, if it covers different market conditions and is simply long enough to generate at least 100 trades. Then I’d pay attention to the distribution of trade results — ideally they should be evenly distribute with no excessive outliers. In other words, if all your profit is generated by a couple of trades while other trades are around 0 I would be in doubt if the trading rule is really based on a repeating local market inefficiency and not on some occasionally caught random process.

As to MC method — I personally do not use it as I do not build mathematical models for trading systems, so either my systems provide more or less equal returns for any given period (and in this case it makes no sense to MC), or vice versa — they do use some significant information which could be simply lost when MCing. So, in both cases MC makes no sense for me. However there are a lot of people around who build their systems on mathematical models, and for them, I suppose, MC is crucial to test.

It’s a bit difficult to go any further because we don’t have any idea not only about your trading rules (and no one expects you to publish them for sure), but also about your approach: if it’s based only on abstract mathematical models or on some market facts. Your comment that your rules are not based directly on financial time series makes me think that you follow the latter approach. However any more detailed information from your side could help.

—–

thanks for your detailed response. Despite coming from a mathematical background, I believe that trying to create a parsimonous mathematical model that explains all (or even the majority) of market behaviour, is fundamentally and intrisically flawed (but thats a topic for a philosophical debate in itself).

I’m already doing most of what you recommend in your reply – including introducing a few “sample statistics” of my own. Like you, (on some reflection), a MC approach does not make sense for my approach either.

I suppose, what I’m trying to get at, is a methodology for determining how much better a particular rule is – compared to a trading rule comprising of ‘randomly generated signals’ – or perhaps a ‘trivial rule’ such as one based on SMA, Fibonnaci (or similar).

The (obvious?) approach I suppose, would be to propose null hypotheses stating that all the generated trades (from all rules being tested) are drawn from the same population (ergo; similar mean and distribution properties) and then test to see if those null hypotheses can be rejected.

Coming to think of it, that may well be the most appropriate approach (its sometimes good to think out aloud!). I would be interested though, if someone is using an alternative approach to testing whether a specific rule’s performance is largely due to chance, or due to somehow encapsulating some salient information regarding market behaviour.

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!