Programacion de Sistemas Automaticos

mikeldv
Iniciandose
Mensajes: 9
Registrado: 18 Abr 2014 17:06

Programacion de Sistemas Automaticos

Mensajepor mikeldv » 06 May 2014 22:32

Buenas!

llevo un tiempo queriendo empezar con este tema, pero no tengo claro por donde empezar.Descontando el tema de analisis tecnico, por donde podria empezar?
alguien que pueda orientarme?

un saludo

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 07 May 2014 19:50

Lo primero es tener datos de mercado para poder hacer los tests... Yo he probado a capturar cosas con Selenimum y es facil, los hitoricos ya es otra cosa...

Luego el sistema en si, se me ocurren muchas cosas:
- Insiders
- Tecnicos
- Macro
- Fundamental
- Sentimiento
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

mikeldv
Iniciandose
Mensajes: 9
Registrado: 18 Abr 2014 17:06

Re: Programacion de Sistemas Automaticos

Mensajepor mikeldv » 07 May 2014 20:11

La verdad, lo primero que se me habia pasado por la cabeza habia sido el código!
¿En qué lenguaje suele hacerse?¿Plataformas?¿Algún libro para estudiarme?

Lo de los datos (Para backtesting y tal), lo habia pensado.Pero estoy verde en este tema y no tengo claro que temas son clave a tomar en cuenta y como enfocarlos.Cualquier consejo será bienvenido!


un saludo y gracias

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 08 May 2014 14:59

Yo lo hago todo en Java, pero lo puedes hacer como quieras y con la plataforma que quieras ya que no vas a competir con los institucionales en el muy corto plazo, sólo vas a buscar sistemas de más largo plazo.
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 10 May 2014 05:58

Frameworks en java a investigar:

- Tika para formatos de datos
- Selenium, httpUnit etc... Para el robot capturador de datos.
- Big Data para almacenar los datos.
- Mahout y Encog/NeuroPh para procesar los datos.
- JFreeChart, HighStockCharts para mostrar resultados.

Yo ya he hecho bastantes cosas al respecto, si alguien se anima hacemos un grupo de programacion de sistemas.
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!


Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 26 May 2014 18:21

Un proyecto que vale la pena mirar es Zipline que es el motor del famoso Quantopian:

https://github.com/quantopian/zipline
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 07 Jun 2014 12:11

Este web parece descontinuada pero es interesante: http://ojts.sourceforge.net/
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!

Fleming
Iniciandose
Mensajes: 3
Registrado: 29 Nov 2014 10:18

Re: Programacion de Sistemas Automaticos

Mensajepor Fleming » 18 Feb 2015 19:04

Mirando sobre el tema Zipline / Quantopian he encontrado un tutorial que parece interesante (creo que no se ha publicado todavia por aqui):

Financial Analysis in Python
https://github.com/twiecki/financial-an ... n-tutorial

What you will learn

Timeseries analysis using Pandas
Using Google Trends to predict market movements
Build your own trading strategies using Zipline
Common trading strategies:
Momentum trading
Mean-reversion


Yo no lo he hecho todavia pero parece interesente. Ademas viene con video incluido... https://vimeo.com/73875233

Avatar de Usuario
Dalamar
Site Admin
Mensajes: 8926
Registrado: 09 May 2012 01:38

Re: Programacion de Sistemas Automaticos

Mensajepor Dalamar » 16 Feb 2017 04:30

Un comentario muy interesante que he visto en Quora sobre programacion de Robots Forex:

Do forex robots work?

Short answer: Yes. Now, if You think You can whip up a strategy over the week end and watch money roll in while You sip daiquiri by the pool, think again. Here is my story in Forex autotrade.

In late 2003, after a short stint on the Sell side a strategist, i joined a start-up HF where i built the portfolio management system, trading system for multiple funds. I joined another one in 2005 because i wanted a more front office role, picking stocks. In 2007, i thought the game too easy and everything would end in tears, so i docked in Fidelity as a dedicated short seller. Tired of the boom and bust performance, i embarked on a programming journey. In August 2011, i started running a 100% systematic strategy developed on @wealthlabWealthLab (highly recommend the platform BTW). Strategy ran very profitably until the end of 2014, when i left Fidelity. In March 2015, i decided to re-write the strategy on Metatrader 4. Strategy has a proven track record, conversion from C# to C++, and the help of a senior programmer with the US Department of Defense, can’t go wrong, right?

So, we did and launched. We had such an Ackmanish performance that we pulled the plug after less than a month. Back to the drawing board for… 2 years.

I thought i had the right pedigree, but nothing prepared me for the challenge. It is by far the hardest endeavour of my career. It makes impossible problems such as understanding the opposite sex easy in comparison.

Forex has three distinctive features: 24/5 trading time with uneven volume, crushing leverage, shorter time frames.

These are the lessons i learned

Forex is a risk management exercise

The original strategy ran on equities daily bars with no leverage. Forex runs at higher frequency (30, 15 or 5mn). At daily bars level, the market has time to digest information. Signals are not so noisy. At higher frequency, the noise to signal ratio detetiorates significantly. Patterns do not form well.

With crushingly high leverage (100:1 and above), mistakes are costly. So, the game is to minimise drawdowns when strategy stops working and capitalise on the winners. The only way to do this is to develop an adaptive position sizing that will collapse risk in drawdowns and re-accelerate thereafter. We have developed a convex position sizing dll.

2. Time is the wrong container

Robots are designed to run on time charts. Now, volume is not constant throughout the day. Markets don’t trade much in the middle of the night but they are active between Europe and US open.

Our robot would detect valid signals during liquid hours and false positives during low volume hours. Time is the wrong container. BTW, this is the same reason flash crashes happen. Poorly designed algos treat low and high volumes uniformly.

Our solution has been to use constant volume charts. A big Thanks to Scott Phillips for introducing me to tick charts.

3. Forex is not a Christmas tree of indicators, moving averages, Fibo

Many traders use multiple indicators, oscillators. Charts end up looking like Christmas tree. This junk is redundant, fragile. Complexity is a form of laziness.

We use sophisticatedly simple rules that use onTick price only, no lagging derivative of it.

4. How to handle false positives and the science of stop loss

The shorter the periodicity, the noisier the market. Compounding effect of false positives + high frequency = rapid erosion of the equity curve. Stop losses are costly. So, the game is about avoiding stop losses and managing false positives.

These are thorny signal, stop loss and position handling issues. In fact, whatever the problem, better entry is rarely the right solution. We have developed three solutions:

    Scale out to reduce risk as early as possible. This comes from my experience as a short seller. First priority after entry is to reduce size/risk so as to mitigate upcoming short squeeze

    French stop loss: markets are noisy. Patterns develop over time. So, we give enough wiggle room to each position to fully develop. stop loss is fashionably late, hence its name: French stop loss. The flip side is smaller position size

    Multiple time frames: traders who look at multiple time frames want to use longer trends. We have found an inventive way to spot significant longer trends not by using different time frames, but point of significance within a single time frame

    Time is a form of asset allocation: sometimes price goes sideways. Looking at different time frames, either short and/or longer, there are perfectly valid trends. So, the same strategy can be deployed across various time frames so as to hedge or supplement the pivot time frame

5. Philosophy, beliefs and concepts

At the end of the day, an automated strategy is the extreme formalisation of a philosophy. Complexity is a form of laziness. Every challenge required changing perspective, unlearning, simplification. This is the hardest and never ending part. Apple’s iOS will never be finished, and neither will our strategy.

In China, women usd to have their feet wrapped in banadage so as to make them petite. It is said that every centimeter was worth a barrel of tears. Every month on the strategy has brought its own barrel of tears.

Over the last two years, I have eaten enough humble pie to open an international bakery chain. It has been a long painful journey of unlearning and purification of concepts to their essence. If i had known beforehand what i was up for, i would have looked for a job in the HF world. This is much more cushy than designing a Forex robot

Conclusion

Going in, i thought the strategy i used to run was sophisticated. Now in retrospect, it seems crude, blunt disrespectful of the markets. You must respect the markets for one reason only, because markets certainly will not respect You back.

Forex robots work, but they are incredibly hard to design and complicated to program bug-free.

Ironically, it is easy to develop the skills to assess robustness of autotrade strategies. Rather than trying to program your own robot, i would focus on analysis existing ones. Calculate a weekly (if available) monthly:

    - Common Sense Ratio to assess robustness amidst drawdowns
    - Performance/Ulcer Index to determine the quality of performance
    - Ask about position sizing and Voila

Now, the above paragraphs may discourage any aspiring strategist. Here is the greatest lesson of all: building an automated strategy is like building a timepiece. Until the last cog fits in, time will be off. It will be one hell of a tourbillon but persevere, don’t give up. You might be one cog away from sipping daiquiris by the pool and watch the money roll in
¿Te ha gustado este hilo? Compartelo en las redes sociales para que se sume mas gente a la conversacion!


Volver a “Sistemas”

cron

Ingresar