Saturday, November 26, 2016

La Construcción De Un Sistema Comercial

Introducción


GeniusTrader pretende ser una caja de herramientas completa para crear sistemas comerciales. La negociación sistemática de gran alcance requiere varias cosas.


Muchos indicadores y señales correspondientes


Reglas de gestión del dinero


Decidir qué es una cantidad razonable de dinero para poner en un solo comercio (para limitar el riesgo asociado a ese comercio)


Combinando diferentes valores dentro de la cartera (para limitar el riesgo global)


Flexibilidad para poder probar todas las combinaciones con los elementos anteriores


Sistema de backtesting con análisis de resultados


GeniusTrader ya es compatible con la mayoría de esto. GeniusTrader consta de más de 350 módulos de perl (el GT Toolkit) asociados a unos scripts de aplicaciones perl. No tiene interfaz gráfica de usuario, ya que no es absolutamente necesario para lograr sus objetivos.


Sistema de comercio sistemático comienza definiendo una reglas de los sistemas comerciales. En GT que se realiza con cadenas de texto denominadas descripciones sys-sig-indic asociadas con las funciones lógicas del sistema comercial. Por ejemplo, qué condición (s) del mercado y sus condiciones actuales de la cartera son necesarias para abrir una posición larga. Y con respecto a una posición abierta, qué condiciones se requieren para cerrarla, parcial o totalmente? Este es un ejemplo de un análisis de backtest del sistema de trading que GeniusTrader script app backtest. pl puede generar para usted.


Estos gráficos ayudan mucho a darse cuenta de las debilidades de sus sistemas comerciales.


Gran máximo drenaje


Largo período sin nueva alta (muy frustrante cuando estás jugando con dinero real)


No ganancias regulares (sólo un muy buen comercio hizo la mayor parte de los beneficios)


Además GeniusTrader también puede generar gráficos basados ​​en el mercado que se pueden utilizar para ayudarle a crear su sistema comercial. Este es un ejemplo de un gráfico para CUSIP 13000 (Alcatel) que GeniusTrader app script graphic. pl puede generar para usted. El script graphic. pl puede configurarse para generar gráficos con la mayoría de los indicadores de Análisis Técnico publicados. (Más de 100 actualmente disponibles). Además, puede diseñar su propia combinación de las existentes mediante programación. La página Capturas de pantalla tiene muchos más ejemplos de lo que GT puede hacer y explicaciones sobre cómo hacerlo.


Ir más lejos.


Lo que lees parecía interesante y quieres probarlo. Bueno, por eso es software libre. Sin embargo déjame advertirte. GeniusTrader no está destinado a ser utilizado por el típico punto-n-clic en el usuario final. Usted debe saber realmente un pedacito de Perl (bueno no tanto realmente, a menos que usted desee hackear el código sí mismo) pero si usted quiere utilizarlo, usted tendrá que entender cómo crear descripciones de sys-sig-indic.


Leer los documentos (GT / Docs),


Lea las descripciones de la API (perldoc GT_toolkit_module),


Lea las descripciones de script de la aplicación GT (perldoc GT_App_Script),


Tal vez incluso leer el código perl también.


Dicho esto, podemos ayudarle en esa dirección. Encontrarás todo lo que necesitas en las siguientes secciones.


Obtenga el código - Obtenga el código más reciente a través de svn repository o una tarball y regístrese en nuestras listas de correo


Instalación y configuración - GT Setup Instrucciones de instalación, configuración de su base de datos de precios, etc


Usuarios Wiki - Documentación GT para usuarios de GT por usuarios de GT, regístrese y mejórelo usted mismo


Reportar errores, problemas, etc. usando la lista de correo geniustrader-devel.


Diviértete, esperamos verte pronto, disfrutaríamos de tu contribución.


Copyright 2000-2012 GeniusTrader


Por qué crear su propio sistema de comercio?


Si usted quiere convertirse en un profesional a tiempo completo, o mantener su trabajo diario, pero quiere administrar su propio dinero, un sistema comercial es fundamental para el éxito. Esto también se aplica a usted si si el comercio de varias veces al día (daytrader) o el comercio de largo plazo posiciones durante muchos meses. Pero, por qué crear el suyo propio?


Hay varias razones para hacerlo. Un sistema comercial es altamente personal. Debe ajustarse a su estilo de negociación / personalidad y perfil de riesgo. Un sistema de comercio exitoso es tan bueno como su capacidad de negociarlo, y su capacidad de comercio depende de su confianza en él. La mejor manera de operar con éxito es estar 100% confiado en él; Porque cuando usted está mirando hacia abajo una pérdida desagradable después de 5 comercios consecutivos perdidos, la única manera que usted tomará que 6o comercio que gana es si usted tiene confianza inquebrantable en el funcionamiento del sistema en conjunto.


La confianza se gana en su sistema de comercio cuando lo han investigado, lo han probado de nuevo, lo han probado y lo han hecho suyo.


Es realmente así de fácil?


Estaría engañándolo si dijera que crear un sistema comercial exitoso (y luego negociarlo) es un pedazo de pastel. Se necesitan muchas horas de prueba y error, el estudio de las cartas, la iteración y el comercio sim. Pero antes de eso, tienes que aprender los conceptos básicos.


En este artículo y futuros que seguir, voy a ir sobre los fundamentos de la creación de un sistema comercial. Se orientará hacia los comerciantes de inicio a intermedio y asumirá que tiene algunos conocimientos básicos de los indicadores técnicos y el acceso a software de gráficos (como NinjaTrader).


Comencemos con algunos conceptos básicos


Los sistemas comerciales operan en la gama en términos de la variedad interminable de formas de comercio. Usted probablemente ha oído que hay comerciantes de tendencia, y los comerciantes de la contra-tendencia. Los comerciantes de tendencias tienden a ir con el flujo, y los comerciantes de tendencia contra-tienden a pensar en contra de los cereales. Qué estilo en última instancia, gravitar a realmente depende de su personalidad. Hay una cantidad interminable de sistemas de comercio en cualquiera de las dos categorías; Pero una cosa que tienen en común es que necesitan algo para identificar definitivamente la tendencia actual, ya sea alcista o bajista.


Precios


Los precios tienden a fluctuar en un patrón de oscilación, la creación de estanterías y comederos como swing hacia arriba y hacia abajo.


Así que esto nos lleva a la primera lección: el uso de indicadores para determinar la dirección de la tendencia. Vamos a empezar simple y ver lo que llamamos patrones de swing de precios en un gráfico:


Usando BloodHound para NinjaTrader, tenemos aquí un cuadro de precios típico con los cambios de precios identificados en líneas de color verde y rojo dibujado en la parte superior de las barras de precios. A medida que el precio sube, tenemos una línea verde subiendo, y como el precio baja, una línea roja. Cuando el swing cambia de dirección, se puede ver que el precio ha aparecido para rebotar en un piso invisible o golpear un techo. Si ese piso imaginario sigue subiendo como lo hizo de 11:28 a 11:36 en el gráfico, lo llamamos un nivel más bajo. Ese es el punto más reciente del precio es más alto que el último (en este caso el bajo hecho justo después de 10:38). Del mismo modo, el techo se movió hacia arriba, así como el precio establecido lo que llamamos una mayor alta de poco después de las 11:27 a las 11:33. Este patrón de precios donde el precio mantiene el establecimiento de máximos más altos, y los mínimos más bajos se identifica como una tendencia alcista alcista.


De manera similar, si ese techo parece ser progresivamente más bajo (y el piso también), el mercado se dice que está haciendo mínimos más bajos, y los máximos más bajos. Esta es una tendencia global bajista.


Se puede ver claramente que BloodHound también ha marcado las zonas con zonas verdes (alcistas) y rojas (bajistas) en el gráfico para qué camino va la tendencia general.


Y ahora que?


Ahora que usted tiene la tendencia identificada, podemos tomar esta información para ir en contra o con ella dependiendo si está creando un sistema de comercio de tendencia o sistema de comercio de tendencia contra. La tendencia general se puede utilizar como un permissivo general (filtro de comercio) para ir largo o corto. Si bien puede servir como una gran pieza del rompecabezas, es simplemente un bloque de construcción para iniciar su sistema. Un sistema de comercio completo requerirá por lo menos algún tipo de señal de entrada. Vamos a cubrir eso en un futuro artículo.


¡Manténganse al tanto!


Si usted está interesado en la construcción de su propio sistema de comercio, echa un vistazo - www. sharkindicators. com


Cómo construir un sistema comercial


Por Paul M. King | 25 de julio de 2006


Tener un sistema de comercio completo, robusto y rentable o conjunto de sistemas comerciales es la base de cualquier negocio comercial exitoso. Incluso si usted es un operador discrecional, todavía necesita reglas que guíen sus decisiones comerciales y le ayuden a ser disciplinado y consistente. También necesita un proceso para seguir para introducir nuevos métodos comerciales en su repertorio.


Explicaremos todo el proceso de desarrollo del sistema comercial desde su idea inicial hasta su implementación.


Las etapas del desarrollo del sistema comercial son: 1) la idea; 2) hipótesis; 3) investigación; 4) desarrollo; 5) pruebas; 6) optimización; 7) aplicación; Y 8) monitoreo (ver & ldquo; Del principio al final & rdquo;).


Cada sistema de comercio comienza con una idea. La idea es un concepto que describe algún aspecto de la forma en que un mercado en particular, o todos los mercados, funcionan. Las ideas vienen de hacer la investigación o apenas observar los mercados sobre una base diaria. Algunas áreas de investigación que han sido beneficiosas para el desarrollo del sistema incluyen las lagunas del mercado, el impulso y las acciones corporativas (véase "Ideas").


Lo que sea que lo inspire, una idea debe tener sentido y ocurrir con una frecuencia útil que se puede probar. Un sistema comercial debe venir de usted. No tiene que ser completamente original para hacer dinero, pero usted debe entender por qué funciona para tener la confianza para comerciar con el sistema con precisión.


LA HIPÓTESIS


El siguiente paso es definir una hipótesis comprobable basada en su idea. Debe ser posible encontrar datos de apoyo para probar su hipótesis y debe ser capaz de cuantificar la hipótesis para que pueda ser programada y probada.


Un ejemplo sería: & ldquo; Debido a que el cierre de la sesión regular es una suspensión arbitraria en el comercio, los contratos de futuros que han exhibido un movimiento intra-día significativo deben seguir moviéndose en la misma dirección en las sesiones de negociación posteriores. & Rdquo; (Esto es para ilustración.)


Para cuantificar esta regla, debemos tener definiciones precisas para cada una de las variables en nuestra hipótesis. Esto significa que tenemos que definir qué mercados estamos hablando, qué instrumentos dentro de cada mercado y qué tan grande es una medida que constituye un "importante & rdquo; Uno en una dirección particular.


La cuantificación de su hipótesis se divide en cuatro partes: Selección de mercado, filtro de instrumento, condiciones de configuración y señal de entrada.


A qué mercado puede aplicar su idea? Las ideas que son aplicables a múltiples mercados son más valiosas que las que sólo funcionarán para un mercado o instrumento único.


El filtro de instrumentos determina qué instrumentos individuales dentro del mercado seleccionado serán elegibles para el comercio. Esto podría basarse en la volatilidad, el precio, el volumen de operaciones o una combinación de todos ellos. Es importante que sólo incluya instrumentos líquidos con una volatilidad razonable para dar a su sistema la mejor oportunidad de superar los costos de la negociación.


Las condiciones de configuración son reglas específicas que deben ser verdaderas para identificar un comercio potencial. En nuestra hipótesis de la muestra, podríamos decir que el contrato debe haber movido 5% del precio de apertura para señalar una entrada.


La señal de entrada es un conjunto de reglas que determina si se debe colocar un comercio. Estos pueden ser combinados con las condiciones de configuración, pero es más usual tener un conjunto separado de reglas para señalar una entrada de comercio. Por ejemplo, sólo podemos entrar a los cinco minutos antes del cierre si el precio está dentro de un determinado umbral de la cotización diaria alta.


Para nuestro ejemplo, podríamos plantear las siguientes reglas: Para todos los contratos de futuros a plazo fijo negociados en Globex con un volumen diario promedio de al menos 1.000 contratos a través de los últimos cinco días que tienen más de un aumento del X% en el precio de la apertura A Y minutos antes del cierre de la sesión regular, ingrese largo al cierre si están dentro de Z ticks de su máximo para el día (ver & ldquo; Construcción de un comercio & rdquo;).


Esto representa una hipótesis comprobable de que podemos convertirnos en un sistema de comercio mecánico para probar si hubiera sido históricamente rentable y también crear suficientes operaciones para ser un sistema comercial útil. En este punto en el desarrollo de nuestro sistema de comercio no hemos especificado valores exactos para las variables en nuestra hipótesis (X, Y y Z), que viene más adelante.


Las variables principales en la hipótesis se llaman grados de libertad porque cada variable puede tomar múltiples valores que en esencia definen una instancia diferente de nuestro sistema de comercio. Es importante no incluir demasiados grados de libertad en un sistema porque esto puede dar lugar a "ajuste de curva" Nuestras variables a datos pasados, y resultará en un sistema que funciona muy bien en datos históricos, pero no funciona en el comercio real. En general, tres o cuatro grados de libertad suelen ser adecuados para describir una buena idea del sistema de comercio.


Si usted encuentra que necesita muchas variables para describir su sistema, eso es una indicación de que su idea es demasiado complicada y debe desglosarse en los aspectos básicos simples.


Una vez que haya simplificado y cuantificado su hipótesis puede pasar a recopilar los datos necesarios y probar la hipótesis. Si su idea no puede ser cuantificada de esta manera, entonces no es lo suficientemente específica y debe adaptarse para que pueda ser representada por un conjunto de variables y reglas.


Después de haber definido una hipótesis comprobable, e identificado las variables que definen el sistema de comercio, ahora podemos investigar la viabilidad del sistema. Una computadora es una herramienta invaluable para este proceso. La investigación de una hipótesis manualmente requiere mucho tiempo, es tediosa y propensa a errores manuales y psicológicos porque nuestros egos están involucrados. La investigación debe estar sesgada para refutar la hipótesis; Un montón de ideas prometedoras resultan en sistemas comerciales que no son mejores que el azar y no pueden superar los costos de implementarlos.


Para investigar nuestro ejemplo, necesitaríamos datos que nos proporcionen el precio de apertura y cierre de todos los contratos de Globex para el mes de mediodía, y la apertura, alta, baja y cierre de los próximos días. Para probar a través del tiempo, necesitaríamos contratos continuos. Si usted tiene datos requeridos por su hipótesis que no están fácilmente disponibles en forma histórica, puede que tenga que recopilarlos y registrarlos durante los próximos meses para tener lo suficiente como para probarlos. Si sus variables se basan simplemente en abierto, alto, bajo, cierre y volumen, no debería tener ningún problema.


Las fuentes de datos son propensas a errores e inexactitudes. Cada proveedor de datos tiene diferentes métodos para la construcción de contratos de futuros continuos y debe comprobar para asegurarse de que encuentra sus métodos de cálculo aceptable para su sistema de comercio en particular.


En este punto podemos calcular el porcentaje de cambio cada día, y elegir un número que nos da una cantidad razonable de operaciones. Si queremos un comercio por día, elija el porcentaje de movimiento adecuado.


Un entorno de prueba posible es una combinación de Microsoft Excel y un producto secundario que combina fácilmente datos históricos en Excel. Excel es un entorno muy flexible para probar las ideas de negociación porque puede utilizar código de Visual Basic para Aplicaciones (VBA) si no puede lograr lo que necesita en las fórmulas de Excel por sí solo. Las desventajas son que no hay estructura incorporada o fórmulas específicamente diseñadas para implementar y probar sistemas comerciales.


Varios otros entornos de pruebas de sistemas comerciales existen que hacen el 80% del trabajo para usted automáticamente, pero es el 20% que no pueden hacer eso es importante. Tomando el tiempo para aprender a probar sus propios sistemas de negociación es una habilidad valiosa y le da la


La confianza de no abandonar sus sistemas cuando pasan por un


Perdiendo el tiempo.


Además, debido a que querrá cambiar los valores de las variables en una fase posterior durante la optimización, queremos un entorno en el que podamos cambiar las cosas y ver automáticamente el efecto de los cambios en el rendimiento del sistema.


Ahora que tenemos la idea, hipótesis, variables y datos que necesitamos, podemos desarrollar el sistema en un entorno de prueba para ver si tiene algún valor. Las partes restantes del sistema que deben ser definidas antes de que podamos probarlo son el algoritmo de dimensionamiento de posición y la señal de salida.


Las reglas de tamaño de posición nos dicen cuánto para el comercio. Utilizaremos un algoritmo simple que dimensione nuestra posición de modo que la diferencia entre el precio de entrada y la pérdida de stop sea el doble del tamaño de la Rango Promedio Real (ATR) durante los últimos 10 días y será igual al 1% del capital asignado este sistema. Se trata de un simple algoritmo basado en la volatilidad de la posición de tamaño.


La señal de salida nos dice cuándo cerrar el comercio. Utilizaremos una parada de arrastre simple basada en el doble de ATR. Esta parada se moverá hacia arriba después de cada día cerca de sustracción de dos veces el ATR de la alta.


En este punto, simplemente usaremos valores sensibles para las otras variables principales en el sistema en lugar de tratar de elegir los valores que generen más beneficio. Nuestro objetivo es descubrir si el sistema de comercio es viable, no para maximizar los beneficios potenciales durante un período histórico de pruebas.


PRUEBA DEL SISTEMA


La prueba de un sistema comercial particular se divide en tres etapas principales: pruebas históricas, pruebas de papel en tiempo real y pruebas de dinero real de pequeño tamaño


Durante cada fase de la prueba debemos ser capaces de evaluar cómo está funcionando el sistema y comparar diferentes versiones del sistema en diferentes etapas de desarrollo. La expectativa es una buena manera de hacer esto.


Para comparar diferentes versiones del sistema comercial que se está desarrollando, necesitamos una forma de determinar el valor del sistema y si ganará dinero o no. Una buena manera de hacer esto se llama expectativa del sistema. Para cada operación que el sistema efectúe, calcule la razón de ganancia o pérdida al riesgo inicial (como un número positivo); Esto puede ser referido como R. Luego tome la media R para calcular la Expectativa (E). Las ecuaciones para esto son:


R = Resultado o Riesgo Inicial


E = Promedio (R)


La expectativa nos da una medida de cuánto debe hacer este sistema en promedio por unidad de riesgo. Si usted está arriesgando $ 1,000 en un comercio y la expectativa del sistema es 0.25, usted debe hacer $ 250 por el comercio, en promedio.


La expectativa se puede utilizar para comparar diferentes versiones de un sistema único, o sistemas completamente diferentes porque siempre está en las mismas unidades (beneficio por unidad de riesgo). Por lo tanto, utilizando la esperanza en cada caso, podemos comparar los resultados y saber exactamente cuánto de la ganancia o pérdida es atribuible a qué aspecto del sistema: la entrada, el tamaño, la salida, las comisiones, el deslizamiento y la propagación.


Obviamente, si la expectativa es negativa, o baja, para cualquiera de las pruebas excepto la que incluye los costos de implementación, tenemos un sistema que no funciona o necesita modificaciones. Idealmente, la expectativa debería aumentar después de cada prueba.


Si el sistema tiene una expectativa positiva después de que los costos de negociación se tienen en cuenta, entonces vale la pena pasar a la siguiente etapa, que está probando en tiempo real en papel. Si el sistema tiene una expectativa negativa, podemos abandonarlo, modificarlo o intentar optimizar las variables para que funcione. La optimización de un sistema de expectativa negativa sólo debe considerarse si son sólo los costos comerciales los que están causando que el sistema pierda dinero.


En esta etapa, la optimización informal puede usarse para cambiar cada una de las variables del sistema para ver cómo afectan la expectativa global. El sistema debe ser una expectativa positiva dentro de una gran selección de valores para las principales variables. Esto es lo que lo hace robusto. Si el sistema sólo funciona con unos pocos valores específicos para las variables principales, entonces es probable que sea una anomalía a corto plazo y no funcionará durante períodos más largos.


Tenga cuidado con un alto porcentaje de victorias. Si el sistema tiene operaciones ganadoras más del 60% del tiempo, es probable que sea una anomalía a corto plazo y eventualmente fracasará.


PERFORMANCE HISTÓRICA


El primer nivel de prueba le dice cómo el sistema se habría desempeñado en el pasado. Sólo porque un sistema funcionó bien en el pasado no significa que funcionará bien en el futuro. Sin embargo, dada la elección entre un sistema que siempre ha perdido dinero y uno que ha hecho dinero, cuál tiene la mejor oportunidad?


Durante las pruebas históricas, cada componente del sistema debe ser probado independientemente antes de ser combinado. Tenemos cuatro tipos de pruebas.


1. Señal de entrada + tamaño de posición fija + señal de salida fija


2. Señal de entrada + tamaño de posición fija + señal de salida variable


3. Señal de entrada + tamaño de posición variable + señal de salida variable


4. Señal de entrada + tamaño de posición variable + señal de salida variable + costos de implementación


En la primera prueba, sólo se negociaría un contrato y salir después de un tiempo fijo. En la segunda prueba introduciríamos una toma de ganancias o una parada final que permitiría que los beneficios funcionaran más tiempo para operaciones que son grandes ganadoras. En la tercera prueba pondremos el tamaño de la posición como un porcentaje del capital asignado al sistema basado en operaciones anteriores de modo que a medida que el sistema gana puede arriesgarse más. En la prueba final probaríamos el sistema entero incluyendo un cálculo para las comisiones y cuánto el precio de la entrada y de salida debe diferir de los precios históricos en nuestros datos de la prueba. Un sistema tiene que ser lo suficientemente rentable para superar los costos de negociación y el inevitable deslizamiento (la diferencia en el precio entre su entrada o salida y donde está lleno).


Suponiendo que el sistema tiene una expectativa positiva a través de un número de años, podemos fijar las variables principales en un valor que rinde el número deseado de oficios y pasemos a negociar en tiempo real del papel.


Suponiendo que las pruebas históricas del sistema produzcan resultados positivos, probamos el sistema en papel en tiempo real. Esto demuestra que no hemos adaptado el sistema a los datos y demuestra que las señales se generan a la frecuencia deseada.


Monitoree el mercado y los instrumentos para las señales de configuración y de entrada y registre las operaciones que se introducen en papel. Aplique las posiciones relevantes de dimensionamiento y salida y calcule el múltiplo R para cada operación. Asegúrese de incluir los costos de implementación y una compensación razonable por el deslizamiento.


Al menos 30 operaciones deben ser probadas en tiempo real sin cambiar ningún aspecto del sistema. Si el sistema sigue exhibiendo una expectativa positiva similar a la prueba histórica, es hora de cambiarla de verdad con pequeñas posiciones. Si decide cambiar algún valor o regla del sistema durante este período de prueba, recuerde volver a realizar la prueba histórica y volver a iniciar la prueba de papel en tiempo real.


La prueba de dinero real está diseñada para asegurarse de que el sistema se puede implementar tal como lo ha diseñado. Debe utilizarse un tamaño mínimo de la posición. Debido a eso, los costos de implementación serán una proporción mucho mayor del valor comercial que con posiciones de tamaño completo. No estamos tratando de hacer dinero aquí, sólo prueba que podemos implementar el sistema de comercio con precisión con el deslizamiento razonable.


MEJORAMIENTO


Ahora tenemos un sistema de expectativa positiva que hemos probado históricamente en papel en tiempo real y con posiciones de pequeño tamaño. Antes de implementarlo con posiciones de tamaño completo, debemos decidir si queremos optimizar cualquier aspecto del sistema.


La optimización se puede utilizar de tres maneras: para encontrar conjuntos de valores para las principales variables que trabajan para convertir un sistema de expectativa negativa en positivo, para encontrar el mejor sistema de ejecución histórica y para encontrar el rango posible de variables que funciona mejor y elegir Que están en el medio de esta gama.


La optimización sólo debe utilizarse en el último caso. Puede usarse para encontrar conjuntos de valores que funcionen para un sistema, pero sólo si hay muchos ejemplos estrechamente relacionados de expectativa positiva. Una vez más, casos aislados de alta expectativa es una fuerte indicación de que el sistema es una anomalía y no funcionará en el comercio real.


La forma más fácil de optimizar un sistema comercial es pasar por cada valor de las variables principales y ejecutar su prueba histórica después de cada paso. A continuación, puede construir una tabla que muestra para cada valor de variable principal la expectativa del sistema. A continuación, elija una versión del sistema que tenga la esperanza mediana en lugar de la más alta.


IMPLEMENTACIÓN


Ahora que tenemos una versión rentable, optimizada y eficiente de nuestro sistema de comercio, podemos incorporarlo en nuestro entorno comercial y darle una asignación completa de capital comercial. La implementación se divide en dos partes: primero, debemos automatizar tanto del sistema como sea posible para minimizar los errores de implementación y el tiempo que tarda en operar. A continuación asignamos el capital del sistema.


La automatización de un sistema de comercio es diferente para cada sistema y comerciante. Los sistemas a más largo plazo que toman señales usando datos de fin de día para los siguientes abiertos, tienen paradas relativamente largas y mantienen posiciones durante semanas o meses requieren muy poca automatización y


Se puede controlar manualmente en unos minutos después de cada cierre.


Para sistemas que toman múltiples señales por día y mantienen posiciones por sólo unos pocos minutos, se necesita una automatización máxima. La mayoría de los corredores electrónicos ofrecen una interfaz de programación de aplicaciones (API) a su cuenta que puede utilizar para automatizar un sistema de comercio. Alternativamente, algunos corredores se especializan en la automatización de los sistemas de comercio en su nombre.


Una regla simple de asignación de capital para un nuevo sistema sería asignar el capital disponible a todos los sistemas que se negocian actualmente en proporción a su expectativa. Esto recompensaría a los mejores sistemas con más capital. Si el dimensionamiento de la posición se basa en la asignación actual a cada sistema, a medida que ganamos dinero, puede tomar posiciones más grandes o más pequeñas cuando pierde.


Saber si un sistema está perdiendo dinero requiere supervisión del rendimiento. Esto debe consistir en recalcular la expectativa después de cada operación cerrada y asegurarse de que no se ha convertido en negativo a lo largo de los últimos 50 oficios. Si la expectativa a lo largo de las operaciones recientes se ha convertido en negativo, suspender el comercio de dinero real y volver a negociar papel hasta que la esperanza vuelva a la normalidad. Y si la hipótesis original de su sistema se basa en se convierte en no válido, suspender el comercio de inmediato.


La conclusión es que el desarrollo de un sistema de comercio debe ser un proceso controlado y bien pensado. No debe ser abordado al azar y no debe pasar por alto los pasos vitales que son necesarios para el éxito comercial a largo plazo.


Paul King es un comerciante propietario, entrenador comercial y asesor financiero independiente en Vermont en su empresa PMKing Trading LLC. Puede ser contactado en www. pmkingtrading. com. E-mail: futuresmag@pmkingtrading. com.


Trading Systems: Diseño de su sistema - Parte 1


La sección anterior de este tutorial examinó los elementos que conforman un sistema de comercio y discutió las ventajas y desventajas de utilizar dicho sistema en un entorno de comercio en vivo. En esta sección, nos basamos en ese conocimiento examinando qué mercados son especialmente adecuados para el comercio de sistemas. A continuación, tomar una mirada más en profundidad a los diferentes géneros de los sistemas de comercio.


Comercio en diferentes mercados


El mercado de acciones es probablemente el mercado más común para el comercio, especialmente entre los novatos. En este ámbito, los grandes jugadores como Warren Buffett y Merrill Lynch dominan, y el valor tradicional y el crecimiento de las estrategias de inversión son de lejos los más comunes. Sin embargo, muchas instituciones han invertido significativamente en el diseño, desarrollo e implementación de sistemas comerciales. Los inversores individuales se están uniendo a esta tendencia, aunque lentamente.


Éstos son algunos de los factores clave a tener en cuenta al utilizar los sistemas de negociación en los mercados de renta variable:


& # 13;


La gran cantidad de acciones disponibles permite a los comerciantes probar sistemas en muchos tipos diferentes de acciones - desde acciones volátiles de balcán (OTC) hasta activos no volátiles.


La eficacia de los sistemas de negociación puede verse limitada por la baja liquidez de algunas acciones, especialmente las de OTC y las de pink sheet.


Las comisiones pueden comer en las ganancias generadas por operaciones exitosas, y pueden aumentar las pérdidas. Las acciones de OTC y de hoja rosa suelen incurrir en comisiones adicionales.


Los principales sistemas de negociación utilizados son aquellos que buscan valor, es decir, sistemas que utilizan diferentes parámetros para determinar si un valor está infravalorado en comparación con su desempeño anterior, sus pares o el mercado en general.


Mercados de divisas


El mercado de divisas, o divisas. Es el mercado más grande y más líquido del mundo. Los gobiernos del mundo, los bancos y otras grandes instituciones comercian billones de dólares en el mercado de divisas todos los días. La mayoría de los comerciantes institucionales en la divisa se basan en los sistemas de comercio. Lo mismo ocurre con los individuos en la divisa, pero algunos de comercio basado en informes económicos o pagos de intereses.


Éstos son algunos de los factores clave a tener en cuenta al utilizar los sistemas de comercio en el mercado de divisas:


La liquidez en este mercado - debido al enorme volumen - hace que los sistemas de comercio sean más precisos y efectivos.


No hay comisiones en este mercado, sólo se extiende. Por lo tanto, es mucho más fácil hacer muchas transacciones sin aumentar los costos.


En comparación con la cantidad de acciones o materias primas disponibles, el número de monedas a negociar es limitado. Pero debido a la disponibilidad de "pares de divisas exóticos" - es decir, monedas de países más pequeños - el rango en términos de volatilidad no es necesariamente limitado.


Los principales sistemas comerciales utilizados en forex son los que siguen las tendencias (un dicho popular en el mercado es "la tendencia es su amigo"), o los sistemas que compran o venden en brotes. Esto se debe a que los indicadores económicos a menudo provocan grandes movimientos de precios al mismo tiempo.


Equidad, divisas, y los mercados de productos básicos ofrecen todos los futuros de comercio. Este es un vehículo popular para el sistema de comercio debido a la mayor cantidad de apalancamiento disponible y el aumento de la liquidez y la volatilidad. Sin embargo, estos factores pueden cortar en ambos sentidos: pueden amplificar sus ganancias o amplificar sus pérdidas. Por esta razón, el uso de futuros suele estar reservado para los comerciantes avanzados de sistemas individuales e institucionales. Esto se debe a que los sistemas comerciales capaces de capitalizar el mercado de futuros requieren una personalización mucho mayor, utilizan indicadores más avanzados y llevan mucho más tiempo para desarrollarse.


Así que, cuál es el mejor?


Depende del inversor individual decidir qué mercado es el más adecuado para el sistema de comercio - cada uno tiene sus propias ventajas y desventajas. La mayoría de la gente está más familiarizada con los mercados de renta variable, y esta familiaridad facilita el desarrollo de un sistema comercial. Sin embargo, la divisa es comúnmente pensado para ser la plataforma superior para ejecutar los sistemas de comercio - especialmente entre los comerciantes más experimentados. Por otra parte, si un comerciante decide capitalizar sobre el aumento de apalancamiento y la volatilidad, la alternativa de futuros siempre está abierta. En última instancia, la elección está en manos del desarrollador del sistema.


Tipos de sistemas de negociación


Sistemas de seguimiento de tendencias


El método más común de negociación del sistema es el sistema de tendencia siguiente. En su forma más fundamental, este sistema simplemente espera un movimiento significativo de precios, luego compra o vende en esa dirección. Este tipo de bancos de sistemas en la esperanza de que estos movimientos de precios mantendrán la tendencia.


Sistemas de media móvil


Frecuentemente utilizado en el análisis técnico. Una media móvil es un indicador que simplemente muestra el precio promedio de una acción durante un período de tiempo. La esencia de las tendencias se deriva de esta medición. La manera más común de determinar la entrada y la salida es un crossover. La lógica detrás de esto es simple: una nueva tendencia se establece cuando el precio cae por encima o por debajo de su promedio de precios históricos (tendencia). Aquí hay un gráfico que traza tanto el precio (línea azul) como el MA de 20 días (línea roja) de IBM:


Sistemas de Breakout


El concepto fundamental detrás de este tipo de sistema es similar al de un sistema de media móvil. The idea is that when a new high or low is established, the price movement is most likely to continue in the direction of the breakout. One indicator that can be used in determining breakouts is a simple Bollinger Band® overlay. Bollinger Bands® show averages of high and low prices, and breakouts occur when price meets the edges of the bands. Here is a chart that plots price (blue line) and Bollinger Bands® (gray lines) of Microsoft:


Disadvantages of Trend-Following Systems:


Empirical Decision-Making Required - When determining trends, there is always an empirical element to consider: the duration of the historic trend. For example, the moving average could be for the past 20 days or for the past five years, so the developer must determine which one is best for the system. Other factors to be determined are the average highs and lows in breakout systems.


Lagging Nature - Moving averages and breakout systems will always be lagging. In other words, they can never hit the exact top or bottom of a trend. This inevitably results in a forfeiture of potential profits, which can sometimes be significant.


Whipsaw Effect - Among the market forces that are harmful to the success of trend-following systems, this is one of the most common. The whipsaw effect occurs when the moving average generates a false signal - that is, when the average drops just into range, then suddenly reverses direction. This can lead to massive losses unless effective stop-losses and risk management techniques are employed.


Sideways Markets - Trend-following systems are, by nature, capable of making money only in markets that actually do trend. However, markets also move sideways. staying within a certain range for an extended period of time.


Extreme Volatility May Occur - Occasionally, trend-following systems may experience some extreme volatility, but the trader must stick with his or her system. The inability to do so will result in assured failure.


Countertrend Systems


Basically, the goal with the countertrend system is to buy at the lowest low and sell at the highest high. The main difference between this and the trend-following system is that the countertrend system is not self-correcting. In other words, there is no set time to exit positions, and this results in an unlimited downside potential.


Types of Countertrend Systems


Many different types of systems are considered countertrend systems. The idea here is to buy when momentum in one direction starts fading. This is most often calculated using oscillators. For example, a signal can be generated when stochastics or other relative strength indicators fall below certain points. There are other types of countertrend trading systems, but all of them share the same fundamental goal - to buy low and sell high.


Disadvantages of Countertrend Following Systems:


E mpirical Decision-Making Required - For example, one of the factors the system developer must decide on is the points at which the relative strength indicators fade.


Extreme Volatility May Occur - These systems may also experience some extreme volatility, and an inability to stick with the system despite this volatility will result in assured failure.


Unlimited Downside - As previously mentioned, there is unlimited downside potential because the system is not self-correcting (there is no set time to exit positions).


The main markets for which trading systems are suitable are the equity, forex and futures markets. Each of these markets has its advantages and disadvantages. The two main genres of trading systems are the trend-following and the countertrend systems. Despite their differences, both types of systems, in their developmental stages, require empirical decision making on the part of the developer. Also, these systems are subject to extreme volatility and this may demand some stamina - it is essential that the system trader stick with his or her system during these times. In the following installment, we'll take a closer look at how to design a trading system and discuss some of the software that system traders use to make their lives easier.


Descripción


Desde la aleta interior


Given the increasingly frenetic pace at which the stock market is changing, traders are turning to new and ever more powerful tools to help them better manage their investments. Chief among these is TradeStation®, the premier investment software on the market today. In Building Winning Trading Systems with TradeStation ® + Website, Second Edition . systems experts George Pruitt and John Hill walk you through the ins and outs of this remarkable platform, giving you the tools, expertise, and advice you need to put it to work for you.


A user's manual for anyone looking to learn the fundamentals of creating and utilizing trading systems with TradeStation, the book explains EasyLanguage®, the proprietary, easy-to-use programming language that allows you to build customized trading strategies. Covering the essentials of successful programming, the book addresses program structures, how to measure trading system performance, and much more.


Filled with practical examples, including the code you need to put them to use, this Second Edition of Building Winning Trading Systems with TradeStation ® + Website covers the key topics—from debugging and output to analysis techniques—that you need to master in order to trade in the stock, futures, commodities, and other major markets. Also exploring how to use TradeStation as a research tool, and offering insightful interviews with some of the top developers in the trading industry, the book is a truly comprehensive manual to using the TradeStation platform.


In addition, in-depth appendices and a supplemental website featuring updated code make this fully revised and updated edition of Building Winning Trading Systems with TradeStation ® + Website the ultimate guide to using the world's best investment software to develop and utilize trading systems that are nimble enough to help you profit in today's fast-moving markets.


Descripción del producto


The updated edition of the guide to building trading systems that can keep pace with the market


The stock market is constantly evolving, and coupled with the new global economic landscape, traders need to radically rethink the way they do business at home and abroad. Enter Building Winning Trading Systems, Second Edition . the all-new incarnation of the established text on getting the most out of the trading world. With technology now a pervasive element of every aspect of trading, the issue has become how to create a new system that meets the demands of the altered financial climate, and how to make it work.


Giving voice to the question on every trader and investor's lips, the book asks, "How can we build a trading system that will be paramount for our increasingly stressed markets?" La respuesta? Establish mechanical trading systems that remove human emotion from the equation and form the cornerstone of a complete trading plan and with greater agility, characteristics that are more important than ever given the kinetic pace of the markets.


Presents an all-new strategy for trading systems that will show traders how to create systems that will work in the twenty first century


Expert advice from highly respected trading authority, George Pruitt


Includes a new website featuring updated TradeStation code and shows how to use the world's best investment software platform to develop and utilize trading systems that really work


Once again paving the way for traders who want to adapt to their environment, Building Winning Trading Systems, Second Edition combines expertise in indicator design and system building in one indispensable volume.


De la contraportada


Praise for Building Winning Trading Systems with TradeStation ® , 1st Edition


"This book will prove vital to all systematic traders. Pruitt and Hill share a wealth of innovative timing patterns and fully disclosed trading strategies. For TradeStation® users, there are powerful tutorials on indicator design and system building. The authors' vast expertise will benefit even practiced TradeStation® veterans."


—NELSON FREEBURG . Editor, Formula Research


"TradeStation® systems traders will discover a virtual gold mine of knowledge, guidance, and the benefit of vicarious experience from the two foremost experts on the subject in this valuable new addition to trading systems literature. There has long been a notable lack of worthwhile reference material for TradeStation® users, and Building Winning Trading Systems with TradeStation ® fills a large void in this area."


—EDWARD DOBSON . President, Traders Press


& Quot; Building Winning Trading Systems with TradeStation ® is filled with useful information and practical real-world examples. I believe TradeStation 6® users will find it a valuable resource."


—BILL CRUZ . Co-CEO, TradeStation Group, Inc.


Sobre el Autor


GEORGE PRUITT is Director of Research for Futures Truth magazine. He has written for Futures magazine and has had his research published by the Wall Street Journal and Barron's . Pruitt holds a bachelor's degree in computer science from the University of North Carolina at Asheville and co-programmed the Excalibur testing software. He has coded over 1,000 different trading methodologies and is the coauthor of The Ultimate Trading Guide (Wiley).


JOHN R. HILL is President and founder of Futures Truth magazine, a leading periodical that analyzes and rates trading systems. He holds a master's degree in chemical engineering from The Ohio State University and is the coauthor of The Ultimate Trading Guide (Wiley).


building a trading computer.


I'm considering having a custom system built. My computer died and I know that when building you usually get a better deal than buying a manufactured model. When building a computer what are the most significant features that will make a difference when trading stocks. What types of technology do most online brokers networks, systems/platforms use? I read somewhere that thinkorswim has maximum limits on ram usage. I don't want to spend hundreds on features that really don't make that much of a difference. Basically some guidance and opinions on what truly is necessary and what will make a drastic difference in execution speed, pattern recognition etc. in general where does speed and memory really start to differ when it comes to standards/upgrades when day trading


these are general questions that I am trying to sort out any help is appreciated


1. CPU (processor)


A. Does multi-core processing really speed up the results? Most processors now a days have somewhere between 2-8 cores, the 2 and 4 core cpu's seem pretty popular. So some processors have the same GHz but multiple cores is that something significant, the tasks are spread over multiple cores meaning the higher core processor in theory should be much faster at completing the same task?


B. Do differences in GHz speeds noticeably improve performance 2.ghz vs 3ghz vs 4ghz etc most processors fall in the mid 3 to 4 range, will 3.5ghz really be all that different than 4.0ghz?


2.Memory (ram). I know ram is basically current task/multitasking memory. So fast reliable memory should be something to invest in and the price differences aren't really all that significant. Does ram speed make a huge difference DDR3-1600 vs DDR3-2800?


I know the amount of useable ram is crucial, but how much is really needed, 4gb,6gb,8gb,16gb? I plan on only running the operating system, the platform, internet, antivirus - no background programs. Is it likely with just running charts and a broker's online platform that I will I ever hit a wall when using 4-8gb of ram?


3. storage


ssd - solid state drive is faster, I've read it's for sure worth the upgrade


vs typical sata hard drive - what about hybirds (msata - I think msata is hybrid between the two? ).SSD's are expensive if I'm lucky I can pick up a cheap SSD for the same price as a standard 1T 7200rpm hard drive. I'm thinking 120gb ssd unless a 250gb goes on sale


4.graphic-video card (s)- must be capable of running multiple monitors. but the quality of the image of charts really isn't that high priority, speed more so than crispness or image quality so I think try to get highest video ram possible? and get something crossfire or sli capable if I'm using multiple cards.


5.psu power supply and cpu cooler - basically depends on what your watt and usage are, obviously I should go for quality but not overkill


6.same goes for motherboard and case go for quality but the specifics of what I need will be based on all of the above and really what the system needs -


for me the most difficult part is going to be selecting the specifications of the cpu processor and video card that I want. I will need minium a system that can run 3 monitors and possibly based on price difference something that can run up to 6. I think most modern processors will get the job done well, and a decent video graphic card(s) with necessary adapters as long as they work together and extend my desktop and don't lag.


so I'm thinking intel i3 series cpu, maybe i5. Give or take the i3 series are about half the cost of the i5, is i5 and i7 2-4x faster because the price give or take 2x more. If I'm not scalp trading with 10+ thousands of shares and huge lots will an upgraded processor be beneficial and worth the investment? I know I can get a much better AMD for similar prices but the computers I've had with AMD processors really seem to slow down after time and I'm pretty sure it had more to do with the processor durability than the ram and hard drive of my previous computers. My intel computers lasted longer they also did get slower with age not as noticeably so. I'm budgeting about $100-150 per major part some will be under $100 and will make up for the slightly more expensive parts. My hope is to build a decent system for $500-700 I'm not sure how realistic that goal is but I do feel the computer will probably be better than what I could purchase in that price range - basically the build vs buy price difference would mostly be the presence of graphic card(s), ssd storage and ram more and/or faster ram. What you buy for $500-$700 will probably not be able to display multiple monitors-may not be able to expand ram memory, is probably going to have slightly slower ram as well as slower storage/hard drive


Más sobre. building trading computer


18 Answers


5.8k Views • Upvoted by Luca Parlamento. Quant Trader (Asia PAC) / PhD candidate in Machine Learning…


To start with the basics, get a hold of Amibroker ( AmiBroker - Download ). Amibroker has an easy to learn language and powerful backtest engine where you can prototype your ideas. Also get Howard Bandy 's book Quantitative Trading Systems. This book is a really good introduction to the concepts of quant developing.


You'll also need at least a basic knowledge of statistics. There are plenty of good MOOC courses available for this for free. Such as this one Statistics One - Princeton University | Coursera


It's also worth following The Whole Street. which is a mashup of all the quant blogs, many of whom publish Amibroker code with their ideas.


From there, it's then worth learning Python ( learn python - Google Search ), and also doing Andrew Ng's excellent Stanford University Machine Learning course, which runs for free on Coursera .


If you then want to put your own algorithms to the test, good sites for that are Quantconnect or Quantopian .


Finally, this guy has some good advice on turning it into your career http://www. quantstart. com /


Good luck with the journey!


Partially taken from Alan Clement's answer to How can a software developer in finance become a quant developer?


Building Trading Systems – part 4 – Entry and Exit techniques and system optimization


by Scott March 14, 2014


This is Scott Phillips. I’m taking over from Mole for a week, attempting to impart what I know about system design and trading for a living.


Yesterday, to recap, we talked about choosing an edge based on a known property of markets that you have an affinity with (everybody has favorites) and working out which market types it works in and which market types it does not. If you don’t know which market types your system works in the best you can ever hope for is mediocre performance, which comes down to small edges, long drawdowns, and systems not suitable for trading at R values of 2% or above. If you think your edge is universal and works all the time you are being foolish. Markets are hard to beat because they change constantly in fractal ways. By aligning your approach with the current market type you not only increase your overall winning edge but your edge becomes REPEATABLE and CONSISTENT. If there is one thing the pros in any field have it is repeatability and consistency. Any weekend golfer can hit a birdy but Tiger Woods can do most of the time.


Some other edges I forgot to mention


Opening gaps are an edge


Breakouts are an edge


Failed Breakouts are an edge


Implied Volatility is an edge


Market Internals are an edge


TICK and TRIN are an edge


Mole’s Zero indicator is an edge


Sequences of unbroken series of highs and lows is an edge


Consecutive Up/Down closes is an edge (but a thin edge)


The shape of the most recent candle is an edge


Which of the following 2 edges do you instinctively think performs better?


Edge A Trading a Donchian Channel breakout on a 60 min chart?


Edge B Trading a Donchian Channel breakout on a 60 minute chart only in the direction of the higher timeframe trend where the 240 minute, daily and weekly charts were trending AND where volatilty, measured as bollinger bandwidth has painted the lowest low in 100 bars in the previous 10 bars?


Which of the 2 edges do you think will be more consistent? Which of the two edges do you think will have longer streaks of winning trades? Losing Trades? Which of the 2 systems do you think is more likely to fall apart if the market type changes?


I see many people in the comment section defending their existing systems and proposing random stuff they read on the internet. What I am showing you here are fundamental truths about market systems – NONE OF THEM, none of them at all, work all the time. None of them work the same, or just as well in trending or sideways markets, or low and high volatility markets. You can do decades of backtesting, and because of the skew of the last 30 years containing mainly bull moves, you will get backtest results which will not match up with the reality of forward testing. I am also showing you some fundamental truths about markets in general and trading


Systems based on real market principles are far more likely to work and test better when they do than those which are not


Systems optimized for a particular market type produce results orders of magnitude better than “one size fits all” sistemas


If you have a system which works it will work DRAMATICALLY BETTER once you understand what market types it does not work in!


You might have 10 bad system ideas before you have one good system idea. Therefore it is better to test in a minimal way to separate wheat from chaff


You should not use price based indicators to confirm price based indicators – It’s like asking your Mother if you are handsome 😉


I see in the comment section of the previous post people complaining that the methods of testing targets are arbitrary, and yes they are and those are NOT your final exit parameters. The method of “quick testing” I advocate for preliminary testing of an idea allows you to spend an hour instead of a month to quickly test an idea and decide if it is worth further investigation. There are a lot of blind alleys in system building and because human nature is to get attached to our own ideas we don’t want to let them go once we have spend a month on them. Let’s assume that you have an idea you think might be good, preliminary testing bears that out, now we have to get into the weeds and spend a lot of time building a system around it. This is non-trivial, it will take you a few weeks minimum, so it makes sense to do a lot of quick paper testing to separate the good ideas from the useless ideas before you get to this stage. Even if you are a good programmer, I still advocate pencil and paper testing initially for everything. It gives you a deeper understanding of the edge at the initial stages, and allows time for your market intuition to bubble up pertinent insights. Backtesting is a useful technique, but most system builders do WAY TOO MUCH OF IT. Of my two systems which Mole provides. Crazy Ivan was developed with extensive backtesting. Heisenberg was built with NO BACKTESTING AT ALL. Absolutely none. Cero. Objectively, on any measure you wish to name, Heisenberg is the superior system.


Entry Techniques – Pros y contras


Conceptually you have 4 choices


Entry Technique 1 – Entering on a Stop or StopLimit when the market moves in your favor


The advantage of waiting until the market moves in your favor is that it increases the edge ever so slightly before you get in. Also, if you can place your entry point where other traders place their exit point you can get a little boost from the other guy getting his stops run. This is a very good choice for 5 min chart index traders, also a good choice for traders trading trending markets. One good point about using this technique is that if you are entering on the break of a high (to go long) of a bar, the obvious place to place your stop is just below the low of that bar. Your system will benefit from a logically chosen and not arbitrary stop (though you may want to add a minimum stop distance, abnormally small stops are statistically likely to be hunted as the market noise overwhelms signal. For intraday trading on 60 min charts my experience is that stops around 1.5 times the 15min ATR(14) are optimal and have a better expectancy (Thanks to my friend Frank Bormann for extensive research on this). One particular thing I have noted is that the Asian session FX markets contain substantially more noise and less signal, though remaining very tradeable (most of my trading is intraday FX during Australian market hours). I make my stops several pips wider during the Asian session, to make up for low volume and larger spreads.


This technique is totally unsuitable for trading range bound or choppy markets, it will get your ass handed to you. The disadvantage of this method is that you are entering later, trading some profit for greater certainty.


See the “cheat sheets” above for more detail.


Advanced Technique (Ivan Krastins) – Entering on the Break of a Candle which is confirming your view


This is a powerful and useful technique for entering a trade and filtering many bad trades. Any hammer candle (see cheat sheet above) is a failed attempt to drive the market down (and vice versa with it’s inverse the shooting star). In a strong bull move it is a fundamental and demonstrable principle of markets that most attempts to drive the market down will fail. Every time the bears attempt to drive the market down, they will be forced to cover their shorts at some point. A significant number of them will cover on a break of the previous high, driving the price further up. Especially after hours, even more traders will wake up to the next trading day, find their positions moved against them, and cover in a panic, driving prices further up. This technique works on all timeframes, but is particularly potent on daily charts. Be aware that it has little value *except* in a two situations. Firstly, a strong trend (see previous post for ideas on how to filter for strong trends, you could look for multiple timeframes, high SQN, moving averages in alignment, above a long term MA, making higher highs and higher lows), and secondly, at support, for example at bollinger support or trendline support. This technique is the basis for a system which I currently have in development which so far tests extremely well. Ivan also has setups based on this technique called the Trend Trade, which I simplified and modified for the CrazyIvan system. See the cheat sheet above for a full discussion.


Example of How You Might Build A System Around This Principle


Idea: In the very strongest and smoothest trends an early EMA is going to act as resistance. I spend a few hours looking at various “strong trends” with many EMA’s up on the screen (6,8,10,12,14) noting the SQN (measure of trend strength) of each one and looking for patterns. I settle on the 9 exponential moving average as being a common place for retraces to stop in bearish trends which are SQN(100) -.5 or less. After looking at preliminary results I can see that around half the time my edge works, sometimes making for big winners where my initial stop is never touched. This looks promising and I look at the losing trades from my small sample of 50 trades and go back and look at the trend direction on higher timeframes – I note a pattern that half the losing trades come from times where the daily and 60 min trend are in opposite directions. By filtering so that I only take trades with multiple timeframes aligned I increase my edge. If you have an edge which is marginal, quite often you can switch it into “acceptable” territory by using this technique.


Example – Bollinger Breakout


As a general rule I do not favor this technique, but very well composed and emotionally serene people may find it suits them. My experience is that I become slightly anxious trying to get the best fill and it is better for my emotional state to enter on limit or stop


As a general principle for sideways markets entering on a limit order is optimal. I make it a personal rule never to chase the market, and if my limit orders are not filled I try and find acceptance around that. Chasing the market, even by one or two ticks, over time eats away at your account.


This is particularly good for traders who wish to base entries on daily charts and not day trade


Concluding Thoughts on Entries


Don’t get too wrapped up in entries. In systems for range bound markets lean towards entering on a limit. In systems for trending markets you have a choice which depends on your personality. If your edge is shallow you can increase it by adding an additional requirement for a nice looking candle, or candle pattern before you enter. A deep understanding of price action reading in context can help here, and for that I recommend Al Brooks series of videos and books (though not his first book which is incredibly poorly written and recovered in his later 3 volume series). Also Ivan Krastins, member of this community, has many deep insights about the nature of price action, and his site is worth a visit.


Chuck Lebeau Concept for preliminary testing of Entry Techniques


This is not a technique which I use personally, but other system designers I know use this to quickly test and filter whether a given entry technique is useless or has validity. His idea is to estimate the period you want to trade, and test time triggered exits after similar results. For example if you have a system where most trades last 1-4 Bars (like for example CrazyIvan) you might want to test Period1 Period2 Period3 Period4 and Period5 exits. A strong edge should be around 55% in this raw, unoptimized state.


Exit Technique – The Difference Between Professionals and Amateurs.


Amateurs think about entries, professionals think about exits. Amateurs are always looking for a better entry technique. Professionals know that nothing in the markets gets really certain, and the biggest difference to system performance is in the exits.


Most of the methods which are recommended by the “experts” are very wide trailing stops, which give back way too much profit at the end of the trade. It is quite heartbreaking to watch profit in a winning trade evaporate, and this can affect trading emotional state going forward. Many of the old school trend following systems use 3 times the 7 day Average True Range as a stop and in my opinion this is way too large.


You have big decisions to make


How wide is your initial stop?


How soon do you move your stop to breakeven or close to breakeven to protect profits?


When do you bank partial profits, if at all, and why?


How loose do you trail a stop?


Do you take profits on a target or a trail?


All of these decisions have a lot of moving parts and many permutations. Most of us get confused. Here is how I personally answer those questions


1) How wide is your initial stop? I do my preliminary testing either on an ATR based stop or a break of the high or low of the setup candle. For smaller timeframes where there is more noise: signal ratio initial testing of 1.5 times the 15 minute ATR is a good enough place to start. For testing scalping systems on highly liquid markets (think bonds and eminis) the standard exits to test are 4 tick stop 4 tick profit and 4 tick stop 6 tick profit.


What I do is measure the MFE (maximum favorable excursion) of my winning trades and plot a histogram of them using a spreadsheet (google spreadsheets is fine). I use COMMON SENSE when I do this, so it is not suitable for computers and software. What I mean is that lets say I have a trade which makes 3R and then pulls back to breakeven, and then shoots up to 5R, in the real world I would not still be in that trade so I would count it as a 3R MFE not a 5R.


You want to measure 3 things


Maximum Favorable Excursion of winning trades defined as trades which make over 1R


Maximum Retracement as a percentage


Maximum Retracement in R (using common sense)


Add them to a spreadsheet, then sort them and plot as a histogram. I have done this with my winning trades of the last 2 weeks as an example here Your sample size should be at least 50 winning trades to be statistically valid. These are the winning trades from the 18 trades I personally took over the last 2 weeks.


Points to Note:


The more your edge is based on a real property of markets and not stupid curve fitted bullshit the easier it will be to optimize for exits. The more it is based on ONE SINGLE PROPERTY OF MARKETS AND NOT A BUNDLE OF THINGS YOU TRY AND USE ALL THE TIME the easier it will be to optimize. You can see very clearly why I insisted on building your edge based on properties of markets, rather than statistics showing you have an edge based on backtesting. Nice smooth easy to optimize curves? Get it? This is a simple trend following system based on a volatility breakout which I trade every day. Even with a very small sample size it is obvious that this is a real system that behaves in A REPEATABLE AND PREDICTABLE WAY. REPEATABLE AND PREDICTABLE is going to equate to higher system quality numbers. Random looking but with an overall edge is going to equate to shit system quality numbers.


Here we can see that of 11 winners 4 of them made 1.2-1.5R. We also see the nice smooth gradient after 1.2R up to 6R. Some things should be immediately obvious. Optimizing my exits to try and catch 5 and 6 R winners is obviously suboptimal for this system. However it seems quite reasonable to try and catch a decent chunk of the 4R and above winners, which happen about 36% of the time.


One other thing to note: We can see that the median (the middle) of the range of winning trades is approximately 2.5R. This tells us that THE INITIAL STOP IS PRETTY GOOD. Our normal winning trade is 2.5R so that means we have a risk/reward ratio which is better than 2:1


Let’s test a few arbitrary limit exits. If our entry has potential most of the exits (except for the extremes) will look similarly good with small variations. This principle is from Eckhardt and is very useful. If you have a limit exit at 1.5R testing extremely well but everything else testing negative or marginal your edge is garbage and needs to be rethought.


What is very clear is that exiting on a limit at 2.5R would maximise the R return, and thus the expectancy over the 18 trades. However that is a HUGE MISTAKE. We would go from having 11 out of 18 winners (61%) to having 7 out of 18 winners at 38%. As a general proposition win rate is the least important part of a trading system, but a system with 62% losers is going to have to endure huge series of losses and dramatic drawdowns, meaning that it is going to be unsuitable for trading with R values over .5%. I prefer to trade high quality systems with very shallow drawdowns than shitty systems with long and deep drawdowns. So should you.


The effect on expectancy on different limit exits is shown below, assuming all losses are -1R. You should be able to take the best result and improve on it substantially by optimization. By way of comparison my production systems, optimized, test in the 3.7 range on SQN(100). Here we see that a limit exit of 1.2R is going to get us .29 expectancy and 3.17 SQN(100). This is not bad, pretty damn good actually. In the production system the optimization takes this to Expectancy .5 and SQN(100) of 3.7. So these initial limit exit numbers give us a benchmark of baseline performance and let us know where is the sweet spot for banking partial profits.


This is extremely important. Pay attention.


Because the sweet spot in SQN terms is exiting on a limit at 1.2R we can smooth the equity curve and reduce the standard deviation by BANKING PROFITS AT THE SWEET SPOT ON THE LIMIT EXIT SQN CURVE. This is critical, and needs to be absorbed. You could bank 1/4 or 1/2 of your position at this sweet spot, or more importantly you know the different numbers you should be testing for on your forward test. You can then either go back through your last trades, or walk forward testing a new series of trades, using a spreadsheet to work the difference in different exit strategies on overall SQN.


Every system is different! Once I understand objectively how my entry behaves I can now use my spreadsheet to play with various combinations of partial exits and trailing stops initiated at various points, depending on what I want to achieve.


On Surviving Retracements


The maximum retracement you can stand bearing has to be closely matched to your personality and the level of psychological trauma you have previously suffered in your trading life. It might be mathematically optimal to allow a 3.9R winner to evaporate into a -1R loss, but in the real world those kinds of equity swings play havoc with your ability to trade at a high efficiency. There are those who say “just man up and follow your rules” but invariably people who are dogmatic about that stuff have rules which bank comparatively early where it is emotionally comfortable to do so. If you are going to shoot for the big winners there are both emotional and technical advantages to banking some profits along the way.


Question: Based on this histogram – where do you think I should bank some profits? Por qué?


As a general rule if you want to catch enough of the big winners to justify optimizing to catch those winners (which by definition will be suboptimal for small winners) you have to be prepared to endure at least a 50% retracement of the move at some point. Because of this there is an enormous advantage to trend following systems to entering BEFORE a rise in volatility, rather than the conventional wisdom breakout trades which often get you in quite late. The alternative if you wish to build breakout systems (which are good systems) is to filter the breakouts for only the STRONGEST breakouts, which by definition happen after EXTREMES of low volatility.


Another fundamental concept of markets is that it is EXTREMELY COMMON for markets to backtest breakout points. If you are trading any system which is relying on trend continuation after a breakout if you move your stop to breakeven too early you will be taken out enough of the time to have an adverse effect on performance. This is the perfect example of using market principles that we all know are demonstrably correct, rather than endless computer fitting.


Pay Attention – This is the KEY to designing effective exit algorithms


No one type of stop is going to give you anything like decent performance overall. The correct thing to do is to choose 4 or 5 or more different types of stops and have them in a race to take out your trade.


Limit Exit at a target in sideways markets at resistance (bollinger, trendline, market profile)


Multiple Closes outside the bollinger band exit (suggest 2 or 3 consecutive closes outside bollinger exit on close)


Time Based Stop – If your trade hasn’t made 1R by x bars then exit


Chandelier Stop – Hang from the highest price yet achieved in the trade


ATR Stop


Spike Low Stop – This is very valuable for strongly trending markets


Trailing Stop – In ticks, in R or in multiples of ATR


Sign of Strength or Sign of Weakness stop. If you get long on a breakout you do NOT want to see a strong down bar within a few bars of entry.


Modified Spike Low Stop (inside MA) Only count spike lows which are deep enough to pierce a Moving Average or linear regression you like


Trend Reversal Exit – If you have a favorite technique for indicating a new trend is starting in the opposite direction, you can use this as a signal to exit a trade. This is particularly powerful if you are in, for example a daily chart trade and you have a 4hr signal in the opposite direction.


Percentage of Maximum Favorable Excursion Stop


Parabolic SAR Stop – Welles Wilder Designed this stop which gets tighter and tighter as time goes on


Indicator Stop – One of the most effective stops for trending markets (applied in conjunction with other stops) is a bollinger bandwidth stop


That is so important I’m going to repeat it. It is KEY to building systems.


Note: Having a system is not a suicide pact! You can build limited discretion into your rules. For example one of my own rules is that if the stop I am planning on placing is within a few ticks of a spike high or spike low which is likely to have stops there, then I will relax my stop by a few ticks so that I don’t get stopped out by big players gunning for stops. Another example of an appropriate discretion rule is to add an extra 2 ticks to your stop for intraday trading the Asian session to account for the greater noise:signal ratio. Another appropriate relaxation might be to place your stop behind closeby support (whatever support fits your beliefs) for extra protection


General Exit Principles


Most people place their stops too tight at the start and middle of the trade, and too loose at the end. Do the opposite


Once you get to a point in your trade where the RISK:REWARD is 1:1 or worse you should be exiting. This is extremely important.


You should be tightening your stops or flat out exiting on a limit as you get to high R multiples where the risk is not worth holding any longer. On the example below it is obvious that the 4R point is where I should be planning to start tightening my stops and be happy if I am taken out of the trade.


What am I optimizing for, anyway? Total R, Expectancy? SQN?


There are many different measures of system performance. Expectancy, Clawback Factor, Time at fresh equity highs, Dependency (% of time a win is followed by a win and vice versa), average length of drawdown, maximum drawdown.


My opinion is that the following statistics tell me everything I need to know.


Win rate (although this is the least important thing)


Expectancy – Total R / Number of Trades


Expectunity (opportunity x expectancy) so .2 expectancy x 100 trades a year @ 1% R is expected 20% per year


System Quality Number (100)


Note on SQN – calculating SQN as some suggest using the square root of the number of trades gives a false positive for prolific but poor systems. Limit the maximum value to 100. So in effect the formula is


10 x expectancy / standard deviation


An SQN of 2 is a tradeable but average system, but if your preliminary backtest results are in the low 2s for many reasons backtests dont perform like reality, you probably need to throw it away. The ratio of expectancy to standard deviation is the key thing here. Once you understand what standard deviation is you can work out how to optimize for it. Rather than repeat it just go here


If you optimize your exits to maximise SQN you will have smaller drawdowns and be capable of trading your system at higher R values, up to 2.5%. When we talk about optimizing for SQN we are really talking about optimizing for standard deviation, since expectancy doesn’t change by huge amounts. Understand at a deep level and you can improve your systems dramatically.


Conclusión


For optimizing the trend following system I have outlined above it is obvious I need 3 different exit.


It's not too late - learn how to consistently bank coin without news, drama, and all the misinformation. If you are interested in becoming a subscriber then don't waste time and sign up here. The Zero indicator service also offers access to all Gold posts, so you actually get double the bang for your buck.


Building Winning Trading Systems, + Website, 2nd Edition


Descripción


The updated edition of the guide to building trading systems that can keep pace with the market


The stock market is constantly evolving, and coupled with the new global economic landscape, traders need to radically rethink the way they do business at home and abroad. Enter Building Winning Trading Systems, Second Edition . the all-new incarnation of the established text on getting the most out of the trading world. With technology now a pervasive element of every aspect of trading, the issue has become how to create a new system that meets the demands of the altered financial climate, and how to make it work.


Giving voice to the question on every trader and investor's lips, the book asks, "How can we build a trading system that will be paramount for our increasingly stressed markets?" La respuesta? Establish mechanical trading systems that remove human emotion from the equation and form the cornerstone of a complete trading plan and with greater agility, characteristics that are more important than ever given the kinetic pace of the markets.


Presents an all-new strategy for trading systems that will show traders how to create systems that will work in the twenty first century


Expert advice from highly respected trading authority, George Pruitt


Includes a new website featuring updated TradeStation code and shows how to use the world's best investment software platform to develop and utilize trading systems that really work


Once again paving the way for traders who want to adapt to their environment, Building Winning Trading Systems, Second Edition combines expertise in indicator design and system building in one indispensable volume.


Build Your Own Forex Trading System


Over the next few months we'll be adding a set of lessons to the Trading Gurus website that will teach you how to create your very own forex trading system. The course comes complete with example "robots" written using the MetaTrader 4 programming language which is called MetaQuotes Language 4 (or MQL4 for short).


The first example is extremely simple. It stays in the market all the time. It enters long on an uptick, and short on a downtick. It uses a fixed profit target and a fixed stop-loss. That's it! Despite these limitations in the right circumstances it can "predict the future" with 100% accuracy. That's even better than Forex Megadroid!


No comments:

Post a Comment