Browsing category

Python

Testing the Two Least Risky Markets Per Sector

Limiting sector exposure can help limit draw down.  When back testing with most platforms you have to throw a huge portfolio at an algorithm and hope for the best.  Does it matter that all six markets in your currency sector is currently long?  You bet it does.  If a geo-political event occurs then you could […]

READ MORE

An Explanation of the numPosCurrentSector function

Here is some code and visual aid to help understand how TradingSimula-18 figures out how many current positions are in the same sector as the market that is currently being tested. Now that I know the sector the current market belongs to I can use that information to extract the total positions in that sector. […]

READ MORE

When working with Python – Remember Indentations and You are the Master of your Domain!

Indent four spaces after an if statement. if x ==1: ++++4x = 2 Let’s break down the above code:  Always test the current bar’s high or low against the signal trigger price.  If the extreme of the bar exceeds the level then you know you were filled.  In TradingSimula18 you are sitting on the close […]

READ MORE
  • 1
  • 2