First welcome new members of the SDS-SSO pairs model distribution list. from time to time i send out information bulletins such as this one. today i am continuing to discuss the concept of optimizing my ETF pairs model using a PID control loop i recently wrote.
P stands for proportional,
I stands for integral,
D stands for derivative. without going into a lot of theory, engineers develop code to keep a system or process of some sort at equilibrium or at a particular set-point. a thermostat in a car or house in most instances uses a PID control loop to maintain a particular desired temperature in side the house or water line to keep an engine cool. a sensor measures the parameter of a process that is being set to a particular limit. when the process reaches that limit, the PID controller switches on and begins to govern the process to reduce the error to within specified allowable deviations.
once the controller is on, the error is feedback into the process input signal and the controller calculates how much to adjust the input signal to maintain control. in the case of a PID controller, the error is broken down into 3 components - a proportional error, and derivative error and an integral error. the proportional error is a measure of how much the process is out of balance directly proportional to the ideal or set-point value. the derivative error is a measure of how faster the process is moving out of control. the integral error is an additive quantity that always increases in value until the process is in control. then it is reset to zero.
when everything is stable or at equilibrium, the sum of the error components is zero (0) even though one or more individual components are non-zero. the tuning chart below illustrates the concept. think of 2 children playing on a see-saw going up and down, up and down. when one child is at their peak, this event represents one of the peaks or troughs of the PID value in the chart. when the other child on the ground starts to push up, the former child begins to descend until both children are at the same height off the ground. if the children have the same mass and are equi-distant from the fulcrum, that brief moment constitutes the equilibrium point for this system or process. that point is where the PID sum crosses the x-axis of the chart below. and the cycle repeats itself.
the driving force in the see-saw example is the change in momentum imparted on the system by one of the children pushing up off the ground at their lowest point. the driving force in the SDS-SSO model is the inverse relationship between the 2 ETFs as the market changes tick-by-tick. another facet to point out is that both ETFs don't have the same momentum at every point in time even though one would assume so based on the thesis of 2x up must equal 2x down.
this imbalance can be compensated for a couple of different ways. with respect to the see-saw example, the imbalance can be compensated for by adding a weight to the center of gravity of whichever child is the least massive. the other method of compensation would be to have the heavier child move in closer to the fulcrum point which would reduce the amount of leverage this child has over the other child. then the see-saw will tilt back to even.
in the case of our ETF scenarios, i measure the small differences in leverage and adjust the weights or the amount of money in one ETF or the other. and the PID controller enables me to compensate to maintain equilibrium in one case (the neutral scenario) and exploit these differences in the other case (the ultra aggressive scenario.)
as you can see, the PID value is right about at zero as of Friday the 17th. the system could stop on a dime and stay right here or bounce right back up back up. both of these possibilities have happened recently in the chart. i do my best to tune the model so false re-balancing signals don't happen but the market does what it wants to do.

one more criteria needs to be considered to polish off the ultra aggressive scenario. the chart below shows the percent daily rate of change for each ETF. notice how the 2 signals cross each other and change polarity. to exploit the imbalance as i described above, the ETF with the highest weight has a polarity of > 0 or a bias to the upside. normally bias changes are co-incident with equilibrium changes (criss-crosses.) sometimes bias changes occurr after an equilibrium change and before the next event. this means a local extremum occured mid-cycle. this can be illustrated by using a elevator analogy. elevators our counter-balanced with weights and cables. suppose you enter the elevator at ground level and push the button for the floor at the top of the building.
before you get to your floor, someone on a floor 2 floors below the halfway point pushes the button to go down. prior to stopping to open the door to let the other passenger on board the elevator, the elevator and the counterweights are both moving toward each other. before the elevator and the counterweights pass each other at the same height, the two stop to let the other person board. but instead of going up first to let you off, the elevator skips this step and goes back down to let the other passenger off first. the level where the other passenger got on the elevator is like a local extremum. so in our example, the bias changed from going up to going back down before the elevator and the counterweight crossed each other at the mid point.

again, i'll create a more concise illustration of these concepts by annotating these charts in time as events occur. look for an update email to go out this evening with the latest weightings and scenario performance updates.