Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/VectorTreeSimplifier.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/VectorTreeSimplifier.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/VectorTreeSimplifier.cs	(revision 18060)
@@ -66,4 +66,6 @@
     private static readonly StandardDeviation standardDeviationSymbol = new StandardDeviation();
     private static readonly Variance varianceSymbol = new Variance();
+    private static readonly Min minSymbol = new Min();
+    private static readonly Max maxSymbol = new Max();
 
     private readonly SymbolicDataAnalysisExpressionTreeVectorInterpreter interpreter;
@@ -281,4 +283,12 @@
     private static bool IsVariance(ISymbolicExpressionTreeNode node) {
       return node.Symbol is Variance;
+    }
+
+    private static bool IsMin(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Min;
+    }
+
+    private static bool IsMax(ISymbolicExpressionTreeNode node) {
+      return node.Symbol is Max;
     }
     #endregion
@@ -363,4 +373,8 @@
       } else if (IsVariance(original)) {
         return SimplifyVarianceAggregation(original);
+      } else if (IsMin(original)) {
+        return SimplifyMinAggregation(original);
+      } else if (IsMax(original)) {
+        return SimplifyMaxAggregation(original);
       } else {
         return SimplifyAny(original);
@@ -574,4 +588,12 @@
     private ISymbolicExpressionTreeNode SimplifyVarianceAggregation(ISymbolicExpressionTreeNode original) {
       return MakeVarianceAggregation(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyMinAggregation(ISymbolicExpressionTreeNode original) {
+      return MakeMinAggregation(GetSimplifiedTree(original.GetSubtree(0)));
+    }
+
+    private ISymbolicExpressionTreeNode SimplifyMaxAggregation(ISymbolicExpressionTreeNode original) {
+      return MakeMaxAggregation(GetSimplifiedTree(original.GetSubtree(0)));
     }
     #endregion
@@ -1508,4 +1530,30 @@
         });
     }
+
+    private ISymbolicExpressionTreeNode MakeMinAggregation(ISymbolicExpressionTreeNode node) {
+      return MakeAggregation(node, meanSymbol,
+        simplifyScalar: n => n,
+        simplifyAdditiveTerms: (vectorNode, scalarNode) => {
+          var minNode = MakeMinAggregation(vectorNode);
+          return MakeSum(scalarNode, minNode);
+        },
+        simplifyMultiplicativeFactors: (vectorNode, scalarNode) => {
+          var minNode = MakeMinAggregation(vectorNode);
+          return MakeProduct(scalarNode, minNode);
+        });
+    }
+
+    private ISymbolicExpressionTreeNode MakeMaxAggregation(ISymbolicExpressionTreeNode node) {
+      return MakeAggregation(node, meanSymbol,
+        simplifyScalar: n => n,
+        simplifyAdditiveTerms: (vectorNode, scalarNode) => {
+          var maxNode = MakeMaxAggregation(vectorNode);
+          return MakeSum(scalarNode, maxNode);
+        },
+        simplifyMultiplicativeFactors: (vectorNode, scalarNode) => {
+          var maxNode = MakeMaxAggregation(vectorNode);
+          return MakeProduct(scalarNode, maxNode);
+        });
+    }
     #endregion
 
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorExpressionGrammar.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorExpressionGrammar.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorExpressionGrammar.cs	(revision 18060)
@@ -50,4 +50,5 @@
 
     private const string VectorManipulationSymbolsName = "Vector Manipulation Symbols";
+    private const string VectorSubVectorSymbolsName = "Vector SubVector Symbols";
 
     private const string RealValuedSymbolsName = "Real Valued Symbols";
@@ -127,5 +128,6 @@
 
       #region vector manipulation symbol declaration
-      var subvector = new SubVector() { EnableWindowing = true };
+      var subvectorLocal = new SubVector();
+      var subvectorSubtree = new SubVectorSubtree();
       #endregion
 
@@ -148,5 +150,7 @@
       var vectorSymbols = new GroupSymbol(VectorSymbolsName, new List<ISymbol>() { vectorarithmeticSymbols, vectortrigonometricSymbols, vectorexponentialAndLogarithmicSymbols, vectorpowerSymbols, vectorterminalSymbols });
 
-      var vectorManipulationSymbols = new GroupSymbol(VectorManipulationSymbolsName, new List<ISymbol>() { subvector });
+      var vectorSubVectorSymbols = new GroupSymbol(VectorSubVectorSymbolsName, new List<ISymbol>() { subvectorLocal, subvectorSubtree });
+      var vectorManipulationSymbols = new GroupSymbol(VectorManipulationSymbolsName, new List<ISymbol>() { vectorSubVectorSymbols });
+      
 
       //var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol> { scalarSymbols, vectorSymbols });
@@ -185,5 +189,6 @@
       SetSubtreeCount(vectorterminalSymbols, 0, 0);
 
-      SetSubtreeCount(subvector, 1, 1);
+      SetSubtreeCount(subvectorLocal, 1, 1);
+      SetSubtreeCount(subvectorSubtree, 3, 3);
       #endregion
 
@@ -198,5 +203,5 @@
       AddAllowedChildSymbol(root, constant, 1);
       AddAllowedChildSymbol(aggregationSymbols, vectorSymbols);
-      AddAllowedChildSymbol(statisticsSymbols, subvector);
+      AddAllowedChildSymbol(statisticsSymbols, vectorSubVectorSymbols);
 
       AddAllowedChildSymbol(vectorarithmeticSymbols, vectorSymbols);
@@ -208,5 +213,8 @@
       AddAllowedChildSymbol(vectorroot, constant, 1);
 
-      AddAllowedChildSymbol(subvector, vectorSymbols);
+      AddAllowedChildSymbol(subvectorLocal, vectorSymbols);
+      AddAllowedChildSymbol(subvectorSubtree, vectorSymbols, 0);
+      AddAllowedChildSymbol(subvectorSubtree, scalarSymbols, 1);
+      AddAllowedChildSymbol(subvectorSubtree, scalarSymbols, 2);
       #endregion
 
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorTimeSeriesExpressionGrammar.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorTimeSeriesExpressionGrammar.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorTimeSeriesExpressionGrammar.cs	(revision 18060)
@@ -52,4 +52,5 @@
 
     private const string VectorManipulationSymbolsName = "Vector Manipulation Symbols";
+    private const string VectorSubVectorSymbolsName = "Vector SubVector Symbols";
 
     private const string RealValuedSymbolsName = "Real Valued Symbols";
@@ -167,5 +168,6 @@
 
       #region vector manipulation symbol declaration
-      var subvector = new SubVector() { EnableWindowing = true };
+      var subvectorLocal = new SubVector();
+      var subvectorSubtree = new SubVectorSubtree();
       #endregion
 
@@ -199,5 +201,6 @@
       var vectorSymbols = new GroupSymbol(VectorSymbolsName, new List<ISymbol>() { vectorarithmeticSymbols, vectortrigonometricSymbols, vectorexponentialAndLogarithmicSymbols, vectorpowerSymbols, vectorterminalSymbols });
 
-      var vectorManipulationSymbols = new GroupSymbol(VectorManipulationSymbolsName, new List<ISymbol>() { subvector });
+      var vectorSubVectorSymbols = new GroupSymbol(VectorSubVectorSymbolsName, new List<ISymbol>() { subvectorLocal, subvectorSubtree });
+      var vectorManipulationSymbols = new GroupSymbol(VectorManipulationSymbolsName, new List<ISymbol>() { vectorSubVectorSymbols });
 
       //var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol> { scalarSymbols, vectorSymbols });
@@ -260,5 +263,6 @@
       SetSubtreeCount(vectorterminalSymbols, 0, 0);
 
-      SetSubtreeCount(subvector, 1, 1);
+      SetSubtreeCount(subvectorLocal, 1, 1);
+      SetSubtreeCount(subvectorSubtree, 3, 3);
       #endregion
 
@@ -273,12 +277,12 @@
       AddAllowedChildSymbol(root, constant, 1);
       AddAllowedChildSymbol(aggregationSymbols, vectorSymbols, 0);
-      AddAllowedChildSymbol(statisticsSymbols, subvector, 0);
+      AddAllowedChildSymbol(statisticsSymbols, vectorSubVectorSymbols, 0);
       AddAllowedChildSymbol(quantile, constantZeroToOne, 1);
       AddAllowedChildSymbol(distancesSymbols, vectorSymbols, 1);
       AddAllowedChildSymbol(distributionCharacteristicsSymbols, vectorSymbols, 0);
-      AddAllowedChildSymbol(distributionCharacteristicsSymbols, subvector, 0);
+      AddAllowedChildSymbol(distributionCharacteristicsSymbols, vectorSubVectorSymbols, 0);
       AddAllowedChildSymbol(distributionCharacteristicsSymbols, constantZeroToOne, 1);
       AddAllowedChildSymbol(timeSeriesDynamicsSymbols, vectorSymbols, 0);
-      AddAllowedChildSymbol(timeSeriesDynamicsSymbols, subvector, 0);
+      AddAllowedChildSymbol(timeSeriesDynamicsSymbols, vectorSubVectorSymbols, 0);
       AddAllowedChildSymbol(timeSeriesDynamicsSymbols, constantZeroToOne, 1);
       AddAllowedChildSymbol(timeSeriesDynamicsSymbols, constantZeroToOne, 2);
@@ -292,5 +296,8 @@
       AddAllowedChildSymbol(vectorroot, constantZeroToOne, 1);
 
-      AddAllowedChildSymbol(subvector, vectorSymbols);
+      AddAllowedChildSymbol(subvectorLocal, vectorSymbols);
+      AddAllowedChildSymbol(subvectorSubtree, vectorSymbols, 0);
+      AddAllowedChildSymbol(subvectorSubtree, scalarSymbols, 1);
+      AddAllowedChildSymbol(subvectorSubtree, scalarSymbols, 2);
       #endregion
 
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 18060)
@@ -90,4 +90,5 @@
     Covariance = 63,
     SubVector = 64,
+    SubVectorSubtree = 65,
 
     #region Time Series Symbols
@@ -195,4 +196,5 @@
     public const byte Covariance = (byte)OpCode.Covariance;
     public const byte SubVector = (byte)OpCode.SubVector;
+    public const byte SubVectorSubtree = (byte)OpCode.SubVectorSubtree;
     #region Time Series Symbols
     public const byte Median = (byte)OpCode.Median;
@@ -300,4 +302,5 @@
       { typeof(Covariance), OpCodes.Covariance },
       { typeof(SubVector), OpCodes.SubVector },
+      { typeof(SubVectorSubtree), OpCodes.SubVectorSubtree },
 
       #region Time Series Symbols
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeVectorInterpreter.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeVectorInterpreter.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeVectorInterpreter.cs	(revision 18060)
@@ -728,9 +728,51 @@
           }
         case OpCodes.SubVector: {
-            var cur = Evaluate(dataset, ref row, state, traceDict);
-            return WindowedFunctionApply(cur, (WindowedSymbolTreeNode)currentInstr.dynamicNode,
-              s => s,
-              v => v);
-          }
+          DoubleVector SubVector(DoubleVector v , double start, double end) {
+            int Mod(int x, int m) => (x % m + m) % m;
+            int startIdx = Mod((int)Math.Round(start * v.Count), v.Count);
+            int endIdx = Mod((int)Math.Round(end * v.Count), v.Count);
+              int size = v.Count;
+            if (startIdx < endIdx) {
+              return v.SubVector(startIdx, count: endIdx - startIdx);
+            } else { // wrap around
+              var resultVector = DoubleVector.Build.Dense(size: size - (startIdx - endIdx));
+              v.CopySubVectorTo(resultVector, startIdx, 0, size - startIdx); // copy [startIdx:size] to [0:size-startIdx]
+              v.CopySubVectorTo(resultVector, 0, size - startIdx, endIdx);   // copy [0:endIdx]      to [size-startIdx:size]
+              return resultVector;
+            }
+          }
+          var cur = Evaluate(dataset, ref row, state, traceDict);
+          TraceEvaluation(currentInstr, cur);
+          return FunctionApply(cur,
+            s => s,
+            v => {
+              var node = (IWindowedSymbolTreeNode)currentInstr.dynamicNode;
+              return SubVector(v, node.Offset, node.Length);
+            });
+          }
+        case OpCodes.SubVectorSubtree: {
+          DoubleVector SubVector(DoubleVector v, double start, double end) {
+            int Mod(int x, int m) => (x % m + m) % m;
+            int startIdx = Mod((int)Math.Round(start * v.Count), v.Count);
+            int endIdx = Mod((int)Math.Round(end * v.Count), v.Count);
+            int size = v.Count;
+            if (startIdx < endIdx) {
+              return v.SubVector(startIdx, count: endIdx - startIdx);
+            } else { // wrap around
+              var resultVector = DoubleVector.Build.Dense(size: size - (startIdx - endIdx));
+              v.CopySubVectorTo(resultVector, startIdx, 0, size - startIdx); // copy [startIdx:size] to [0:size-startIdx]
+              v.CopySubVectorTo(resultVector, 0, size - startIdx, endIdx);   // copy [0:endIdx]      to [size-startIdx:size]
+              return resultVector;
+            }
+          }
+          var cur = Evaluate(dataset, ref row, state, traceDict);
+          var offset = Evaluate(dataset, ref row, state, traceDict);
+          var length = Evaluate(dataset, ref row, state, traceDict);
+          TraceEvaluation(currentInstr, cur);
+          return FunctionApply(cur,
+            s => s,
+            v => SubVector(v, offset.Scalar, length.Scalar)
+          );
+        }
         case OpCodes.Variable: {
             if (row < 0 || row >= dataset.Rows) return EvaluationResult.NaN;
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubVector.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubVector.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubVector.cs	(revision 18060)
@@ -20,29 +20,42 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HEAL.Attic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
   [StorableType("4E9511C6-0FA4-496D-9610-35D9F779F899")]
-  [Item("SubVector", "Symbol that represents SubVector sum function.")]
-  public sealed class SubVector : WindowedSymbol {
-    private const int minimumArity = 1;
-    private const int maximumArity = 1;
-
-    public override int MinimumArity {
-      get { return minimumArity; }
-    }
-    public override int MaximumArity {
-      get { return maximumArity; }
-    }
+  [Item("SubVector", "Symbol that represent the SubVector function with local parameters.")]
+  public class SubVector : WindowedSymbol {
+    public override int MinimumArity => 1;
+    public override int MaximumArity => 1;
 
     [StorableConstructor]
-    private SubVector(StorableConstructorFlag _) : base(_) { }
-    private SubVector(SubVector original, Cloner cloner) : base(original, cloner) { }
+    protected SubVector(StorableConstructorFlag _) : base(_) { }
+
+    protected SubVector(SubVector original, Cloner cloner) : base(original, cloner) { }
+
     public override IDeepCloneable Clone(Cloner cloner) {
       return new SubVector(this, cloner);
     }
-    public SubVector() : base("SubVector", "Symbol that represents the SubVector function.") { }
+
+    public SubVector() : base("SubVector", "Symbol that represent the SubVector function with local parameters.") {
+      EnableWindowing = true;
+    }
+  }
+
+  [StorableType("BA11A829-3236-46C3-AE83-9FA8511D8E8C")]
+  [Item("SubVectorSubtree", "Symbol that represent the SubVector function with subtrees.")]
+  public sealed class SubVectorSubtree : Symbol {
+    public override int MinimumArity => 3;
+    public override int MaximumArity => 3;
+
+    [StorableConstructor]
+    private SubVectorSubtree(StorableConstructorFlag _) : base(_) { }
+    private SubVectorSubtree(SubVectorSubtree original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SubVectorSubtree(this, cloner); }
+    public SubVectorSubtree() : base("SubVectorSubtree", "Symbol that represent the SubVector function with subtrees.") { }
   }
 }
Index: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/WindowedSymbol.cs
===================================================================
--- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/WindowedSymbol.cs	(revision 18059)
+++ branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/WindowedSymbol.cs	(revision 18060)
@@ -158,7 +158,7 @@
 
       offsetMu = 0.0;
-      offsetSigma = 0.05;
+      offsetSigma = 0.2;
       lengthMu = 1.0;
-      lengthSigma = 0.05;
+      lengthSigma = 0.2;
 
       manipulatorOffsetMu = 0.0;
