Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Calculators/OnlineSharpeRatioCalculator.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Calculators/OnlineSharpeRatioCalculator.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Calculators/OnlineSharpeRatioCalculator.cs	(revision 6125)
@@ -0,0 +1,109 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public class OnlineSharpeRatioCalculator : IOnlineCalculator {
+
+    private int p;
+    private double transactionCost;
+    private OnlineMeanAndVarianceCalculator meanAndVarianceCalculator;
+    public double SharpeRatio {
+      get {
+        if (meanAndVarianceCalculator.Variance > 0)
+          return meanAndVarianceCalculator.Mean / Math.Sqrt(meanAndVarianceCalculator.Variance);
+        else return 0.0;
+      }
+    }
+
+    public OnlineSharpeRatioCalculator(double transactionCost) {
+      this.transactionCost = transactionCost;
+      this.meanAndVarianceCalculator = new OnlineMeanAndVarianceCalculator();
+      Reset();
+    }
+
+    #region IOnlineCalculator Members
+    public OnlineCalculatorError ErrorState {
+      get {
+        return meanAndVarianceCalculator.MeanErrorState | meanAndVarianceCalculator.VarianceErrorState;
+      }
+    }
+    public double Value {
+      get { return SharpeRatio; }
+    }
+    public void Reset() {
+      p = 0;
+      meanAndVarianceCalculator.Reset();
+    }
+
+    public void Add(double actualReturn, double signal) {
+      double iterationReturn = 0.0;
+      if (p == 0 && signal.IsAlmost(0)) {
+      } else if (p == 0 && signal.IsAlmost(1)) {
+        p = 1;
+      } else if (p == 0 && signal.IsAlmost(-1)) {
+        p = -1;
+      } else if (p == 1 && signal.IsAlmost(1)) {
+        iterationReturn = actualReturn;
+      } else if (p == 1 && signal.IsAlmost(0)) {
+        iterationReturn = actualReturn - transactionCost;
+        p = 0;
+      } else if (p == 1 && signal.IsAlmost(-1)) {
+        iterationReturn = actualReturn - transactionCost;
+        p = -1;
+      } else if (p == -1 && signal.IsAlmost(-1)) {
+        iterationReturn = -actualReturn;
+      } else if (p == -1 && signal.IsAlmost(0)) {
+        iterationReturn = -actualReturn - transactionCost;
+        p = 0;
+      } else if (p == -1 && signal.IsAlmost(1)) {
+        iterationReturn = -actualReturn - transactionCost;
+        p = -1;
+      }
+      meanAndVarianceCalculator.Add(iterationReturn);
+    }
+    #endregion
+
+    public static double Calculate(IEnumerable<double> returns, IEnumerable<double> signals, double transactionCost, out OnlineCalculatorError errorState) {
+      IEnumerator<double> returnsEnumerator = returns.GetEnumerator();
+      IEnumerator<double> signalsEnumerator = signals.GetEnumerator();
+      OnlineSharpeRatioCalculator calculator = new OnlineSharpeRatioCalculator(transactionCost);
+
+      // always move forward both enumerators (do not use short-circuit evaluation!)
+      while (returnsEnumerator.MoveNext() & signalsEnumerator.MoveNext()) {
+        double signal = signalsEnumerator.Current;
+        double @return = returnsEnumerator.Current;
+        calculator.Add(@return, signal);
+      }
+
+      // check if both enumerators are at the end to make sure both enumerations have the same length
+      if (returnsEnumerator.MoveNext() || signalsEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
+      } else {
+        errorState = calculator.ErrorState;
+        return calculator.SharpeRatio;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Trading-3.4.csproj
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Trading-3.4.csproj	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Trading-3.4.csproj	(revision 6125)
@@ -0,0 +1,247 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.DataAnalysis.SymbolicTrading</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.DataAnalysis.Symbolic.Trading-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs" />
+    <Compile Include="Interfaces\ISymbolicTradingEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicTradingModel.cs" />
+    <Compile Include="Interfaces\ISymbolicTradingSingleObjectiveEvaluator.cs" />
+    <Compile Include="Interfaces\ISymbolicTradingSolution.cs" />
+    <Compile Include="Interfaces\ITradingEnsembleModel.cs" />
+    <Compile Include="Interfaces\ITradingModel.cs" />
+    <Compile Include="Interfaces\ITradingProblem.cs" />
+    <Compile Include="Interfaces\ITradingProblemData.cs" />
+    <Compile Include="Interfaces\ITradingSolution.cs" />
+    <Compile Include="Calculators\OnlineSharpeRatioCalculator.cs" />
+    <Compile Include="SingleObjective\SymbolicTradingSingleObjectiveSharpeRatioEvaluator.cs" />
+    <Compile Include="SingleObjective\SymbolicTradingSingleObjectiveEvaluator.cs" />
+    <Compile Include="SingleObjective\SymbolicTradingSingleObjectiveProblem.cs" />
+    <Compile Include="SingleObjective\SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer.cs" />
+    <Compile Include="SingleObjective\SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer.cs" />
+    <Compile Include="SymbolicTradingModel.cs" />
+    <Compile Include="SymbolicTradingSolution.cs" />
+    <Compile Include="Views\SymbolicTradingSolutionView.cs" />
+    <Compile Include="Views\SymbolicTradingSolutionView.Designer.cs">
+      <DependentUpon>SymbolicTradingSolutionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TradingEnsembleModel.cs" />
+    <Compile Include="TradingProblem.cs" />
+    <Compile Include="TradingProblemData.cs" />
+    <Compile Include="TradingSolution.cs" />
+    <Compile Include="Views\TradingSolutionLineChartView.cs" />
+    <Compile Include="Views\TradingSolutionLineChartView.Designer.cs">
+      <DependentUpon>TradingSolutionLineChartView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Views\TradingSolutionView.cs" />
+    <Compile Include="Views\TradingSolutionView.Designer.cs">
+      <DependentUpon>TradingSolutionView.cs</DependentUpon>
+    </Compile>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
+      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
+      <Name>HeuristicLab.Analysis-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
+      <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
+      <Name>ALGLIB-3.1.0</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
+      <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
+      <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
+      <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
+      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs.frame
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs.frame	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin.cs.frame	(revision 6125)
@@ -0,0 +1,45 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Trading","Provides classes to perform symbolic trading (single- or multiobjective).", "3.4.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Trading-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.1")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
+  public class HeuristicLabProblemsDataAnalysisSymbolicTradingPlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingEvaluator.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingEvaluator.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingEvaluator.cs	(revision 6125)
@@ -0,0 +1,26 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  public interface ISymbolicTradingEvaluator : ISymbolicDataAnalysisEvaluator<ITradingProblemData> {
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingModel.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingModel.cs	(revision 6125)
@@ -0,0 +1,26 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  public interface ISymbolicTradingModel : ITradingModel, ISymbolicDataAnalysisModel {
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSingleObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSingleObjectiveEvaluator.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSingleObjectiveEvaluator.cs	(revision 6125)
@@ -0,0 +1,25 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  public interface ISymbolicTradingSingleObjectiveEvaluator : ISymbolicTradingEvaluator, ISymbolicDataAnalysisSingleObjectiveEvaluator<ITradingProblemData> {
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSolution.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSolution.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ISymbolicTradingSolution.cs	(revision 6125)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  public interface ISymbolicTradingSolution : ITradingSolution, ISymbolicDataAnalysisSolution {
+    new ISymbolicTradingModel Model { get; }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingEnsembleModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingEnsembleModel.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingEnsembleModel.cs	(revision 6125)
@@ -0,0 +1,28 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+namespace HeuristicLab.Problems.DataAnalysis {
+  public interface ITradingEnsembleModel : ITradingModel {
+    IEnumerable<ITradingModel> Models { get; }
+    IEnumerable<IEnumerable<double>> GetSignalVectors(Dataset dataset, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingModel.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingModel.cs	(revision 6125)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+namespace HeuristicLab.Problems.DataAnalysis {
+  public interface ITradingModel : IDataAnalysisModel {
+    IEnumerable<double> GetSignals(Dataset dataset, IEnumerable<int> rows);
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblem.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblem.cs	(revision 6125)
@@ -0,0 +1,25 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public interface ITradingProblem : IDataAnalysisProblem<ITradingProblemData> {
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblemData.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblemData.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingProblemData.cs	(revision 6125)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public interface ITradingProblemData : IDataAnalysisProblemData {
+    string PriceVariable { get; }
+    double TransactionCosts { get; }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingSolution.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingSolution.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Interfaces/ITradingSolution.cs	(revision 6125)
@@ -0,0 +1,36 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+namespace HeuristicLab.Problems.DataAnalysis {
+  public interface ITradingSolution : IDataAnalysisSolution {
+    new ITradingModel Model { get; }
+    new ITradingProblemData ProblemData { get; }
+
+    IEnumerable<double> Signals { get; }
+    IEnumerable<double> TrainingSignals { get; }
+    IEnumerable<double> TestSignals { get; }
+    IEnumerable<double> GetSignals(IEnumerable<int> rows);
+
+    double TrainingSharpeRatio { get; }
+    double TestSharpeRatio { get; }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Properties/AssemblyInfo.frame
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Properties/AssemblyInfo.frame	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Properties/AssemblyInfo.frame	(revision 6125)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.DataAnalysis.Symbolic.Trading")]
+[assembly: AssemblyDescription("Provides classes to perform symbolic trading.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2011 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("BB953FDE-86BA-48A2-A684-5CD3A9BB3E31")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.0.$WCREV$")]
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveEvaluator.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveEvaluator.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveEvaluator.cs	(revision 6125)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  public abstract class SymbolicTradingSingleObjectiveEvaluator : SymbolicDataAnalysisSingleObjectiveEvaluator<ITradingProblemData>, ISymbolicTradingSingleObjectiveEvaluator {
+    [StorableConstructor]
+    protected SymbolicTradingSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicTradingSingleObjectiveEvaluator(SymbolicTradingSingleObjectiveEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected SymbolicTradingSingleObjectiveEvaluator() : base() { }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveProblem.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveProblem.cs	(revision 6125)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  [Item("Symbolic Trading Problem (single objective)", "Represents a single objective symbolic trading problem.")]
+  [StorableClass]
+  [Creatable("Problems")]
+  public class SymbolicTradingSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<ITradingProblemData, ISymbolicTradingSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, ITradingProblem {
+    private const int InitialMaximumTreeDepth = 8;
+    private const int InitialMaximumTreeLength = 25;
+
+    [StorableConstructor]
+    protected SymbolicTradingSingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected SymbolicTradingSingleObjectiveProblem(SymbolicTradingSingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicTradingSingleObjectiveProblem(this, cloner); }
+
+    public SymbolicTradingSingleObjectiveProblem()
+      : base(new TradingProblemData(), new SymbolicTradingSingleObjectiveSharpeRatioEvaluator(), new SymbolicDataAnalysisExpressionTreeCreator()) {
+      Maximization.Value = true;
+      MaximumSymbolicExpressionTreeDepth.Value = InitialMaximumTreeDepth;
+      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
+
+      InitializeOperators();
+    }
+
+    private void InitializeOperators() {
+      Operators.Add(new SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer());
+      Operators.Add(new SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer());
+      ParameterizeOperators();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+    }
+
+    public override void ImportProblemDataFromFile(string fileName) {
+      TradingProblemData problemData = TradingProblemData.ImportFromFile(fileName);
+      ProblemData = problemData;
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveSharpeRatioEvaluator.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveSharpeRatioEvaluator.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveSharpeRatioEvaluator.cs	(revision 6125)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  [Item("Sharpe Ratio Evaluator", "")]
+  [StorableClass]
+  public class SymbolicTradingSingleObjectiveSharpeRatioEvaluator : SymbolicTradingSingleObjectiveEvaluator {
+    [StorableConstructor]
+    protected SymbolicTradingSingleObjectiveSharpeRatioEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicTradingSingleObjectiveSharpeRatioEvaluator(SymbolicTradingSingleObjectiveSharpeRatioEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicTradingSingleObjectiveSharpeRatioEvaluator()
+      : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicTradingSingleObjectiveSharpeRatioEvaluator(this, cloner);
+    }
+
+    public override bool Maximization { get { return true; } }
+
+    public override IOperation Apply() {
+      var solution = SymbolicExpressionTreeParameter.ActualValue;
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+
+      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, ProblemDataParameter.ActualValue, rows);
+      QualityParameter.ActualValue = new DoubleValue(quality);
+
+      return base.Apply();
+    }
+
+    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, ITradingProblemData problemData, IEnumerable<int> rows) {
+      IEnumerable<double> signals = GetSignals(interpreter, solution, problemData.Dataset, rows);
+      IEnumerable<double> returns = problemData.Dataset.GetEnumeratedVariableValues(problemData.PriceVariable, rows);
+      OnlineCalculatorError errorState;
+      double sharpRatio = OnlineSharpeRatioCalculator.Calculate(returns, signals, problemData.TransactionCosts, out errorState);
+      if (errorState != OnlineCalculatorError.None) return 0.0;
+      else return sharpRatio;
+    }
+
+    private static IEnumerable<double> GetSignals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, Dataset dataset, IEnumerable<int> rows) {
+      double signal = 0;
+      double prevSignal = 0;
+      foreach (var x in interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows)) {
+        if (prevSignal == 1) {
+          signal = x > -1 ? 1 : x > -2 ? 0 : -1; // 0, -1, -2
+        } else if (prevSignal == 0) {
+          signal = x > 1 ? 1 : x < -1 ? -1 : 0; // 1, 0 , -1
+        } else if (prevSignal == -1) {
+          signal = x < 1 ? -1 : x < 2 ? 0 : 1; // 2, 1, 0
+        }
+        yield return signal;
+        prevSignal = signal;
+      }
+    }
+
+    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, ITradingProblemData problemData, IEnumerable<int> rows) {
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
+
+      double sharpRatio = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, problemData, rows);
+
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
+
+      return sharpRatio;
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 6125)
@@ -0,0 +1,65 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  /// <summary>
+  /// An operator that analyzes the training best symbolic trading solution for single objective symbolic trading problems.
+  /// </summary>
+  [Item("SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic trading solution for single objective symbolic trading problems.")]
+  [StorableClass]
+  public sealed class SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<ISymbolicTradingSolution>,
+  ISymbolicDataAnalysisInterpreterOperator {
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
+    #region parameter properties
+    public ILookupParameter<ITradingProblemData> ProblemDataParameter {
+      get { return (ILookupParameter<ITradingProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    private SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer(SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<ITradingProblemData>(ProblemDataParameterName, "The problem data for the symbolic regression solution."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree."));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicTradingSingleObjectiveTrainingBestSolutionAnalyzer(this, cloner);
+    }
+
+    protected override ISymbolicTradingSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
+      var model = new SymbolicTradingModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue);
+      return new SymbolicTradingSolution(model, (ITradingProblemData)ProblemDataParameter.ActualValue.Clone());
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SingleObjective/SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 6125)
@@ -0,0 +1,53 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  /// <summary>
+  /// An operator that analyzes the validation best symbolic trading solution for single objective symbolic trading problems.
+  /// </summary>
+  [Item("SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic trading solution for single objective symbolic trading problems.")]
+  [StorableClass]
+  public sealed class SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicTradingSolution, ISymbolicTradingSingleObjectiveEvaluator, ITradingProblemData> {
+
+    [StorableConstructor]
+    private SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    private SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer(SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer()
+      : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicTradingSingleObjectiveValidationBestSolutionAnalyzer(this, cloner);
+    }
+
+    protected override ISymbolicTradingSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
+      var model = new SymbolicTradingModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue);
+      return new SymbolicTradingSolution(model, (ITradingProblemData)ProblemDataParameter.ActualValue.Clone());
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingModel.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingModel.cs	(revision 6125)
@@ -0,0 +1,65 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  /// <summary>
+  /// Represents a symbolic trading model
+  /// </summary>
+  [StorableClass]
+  [Item(Name = "SymbolicTradingModel", Description = "Represents a symbolic trading model.")]
+  public class SymbolicTradingModel : SymbolicDataAnalysisModel, ISymbolicTradingModel {
+
+    [StorableConstructor]
+    protected SymbolicTradingModel(bool deserializing) : base(deserializing) { }
+    protected SymbolicTradingModel(SymbolicTradingModel original, Cloner cloner)
+      : base(original, cloner) { }
+    public SymbolicTradingModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter)
+      : base(tree, interpreter) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicTradingModel(this, cloner);
+    }
+
+    public IEnumerable<double> GetSignals(Dataset dataset, IEnumerable<int> rows) {
+      ISymbolicDataAnalysisExpressionTreeInterpreter interpreter = Interpreter;
+      ISymbolicExpressionTree tree = SymbolicExpressionTree;
+      double signal = 0;
+      double prevSignal = 0;
+      foreach (var x in interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)) {
+        if (prevSignal == 1) {
+          signal = x > -1 ? 1 : x > -2 ? 0 : -1; // 0, -1, -2
+        } else if (prevSignal == 0) {
+          signal = x > 1 ? 1 : x < -1 ? -1 : 0; // 1, 0 , -1
+        } else if (prevSignal == -1) {
+          signal = x < 1 ? -1 : x < 2 ? 0 : 1; // 2, 1, 0
+        }
+        yield return signal;
+        prevSignal = signal;
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingSolution.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingSolution.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/SymbolicTradingSolution.cs	(revision 6125)
@@ -0,0 +1,82 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading {
+  /// <summary>
+  /// Represents a symbolic trading solution (model + data) and attributes of the solution like accuracy and complexity
+  /// </summary>
+  [StorableClass]
+  [Item(Name = "SymbolicTradingSolution", Description = "Represents a symbolic trading solution (model + data) and attributes of the solution like accuracy and complexity.")]
+  public sealed class SymbolicTradingSolution : TradingSolution, ISymbolicTradingSolution {
+    private const string ModelLengthResultName = "Model Length";
+    private const string ModelDepthResultName = "Model Depth";
+
+    public new ISymbolicTradingModel Model {
+      get { return (ISymbolicTradingModel)base.Model; }
+      set { base.Model = value; }
+    }
+    ISymbolicDataAnalysisModel ISymbolicDataAnalysisSolution.Model {
+      get { return (ISymbolicDataAnalysisModel)base.Model; }
+    }
+    public int ModelLength {
+      get { return ((IntValue)this[ModelLengthResultName].Value).Value; }
+      private set { ((IntValue)this[ModelLengthResultName].Value).Value = value; }
+    }
+
+    public int ModelDepth {
+      get { return ((IntValue)this[ModelDepthResultName].Value).Value; }
+      private set { ((IntValue)this[ModelDepthResultName].Value).Value = value; }
+    }
+
+    [StorableConstructor]
+    private SymbolicTradingSolution(bool deserializing) : base(deserializing) { }
+    private SymbolicTradingSolution(SymbolicTradingSolution original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public SymbolicTradingSolution(ISymbolicTradingModel model, ITradingProblemData problemData)
+      : base(model, problemData) {
+      Add(new Result(ModelLengthResultName, "Length of the symbolic trading model.", new IntValue()));
+      Add(new Result(ModelDepthResultName, "Depth of the symbolic trading model.", new IntValue()));
+      RecalculateResults();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicTradingSolution(this, cloner);
+    }
+
+    protected override void OnModelChanged(EventArgs e) {
+      base.OnModelChanged(e);
+      RecalculateResults();
+    }
+
+    private new void RecalculateResults() {
+      ModelLength = Model.SymbolicExpressionTree.Length;
+      ModelDepth = Model.SymbolicExpressionTree.Depth;
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingEnsembleModel.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingEnsembleModel.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingEnsembleModel.cs	(revision 6125)
@@ -0,0 +1,81 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  /// <summary>
+  /// Represents trading solutions that contain an ensemble of multiple trading models
+  /// </summary>
+  [StorableClass]
+  [Item("TradingEnsembleModel", "A trading model that contains an ensemble of multiple trading models")]
+  public class TradingEnsembleModel : NamedItem, ITradingEnsembleModel {
+
+    [Storable]
+    private List<ITradingModel> models;
+    public IEnumerable<ITradingModel> Models {
+      get { return new List<ITradingModel>(models); }
+    }
+    [StorableConstructor]
+    protected TradingEnsembleModel(bool deserializing) : base(deserializing) { }
+    protected TradingEnsembleModel(TradingEnsembleModel original, Cloner cloner)
+      : base(original, cloner) {
+      this.models = original.Models.Select(m => cloner.Clone(m)).ToList();
+    }
+    public TradingEnsembleModel(IEnumerable<ITradingModel> models)
+      : base() {
+      this.name = ItemName;
+      this.description = ItemDescription;
+      this.models = new List<ITradingModel>(models);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new TradingEnsembleModel(this, cloner);
+    }
+
+    #region ITradingEnsembleModel Members
+
+    public IEnumerable<IEnumerable<double>> GetSignalVectors(Dataset dataset, IEnumerable<int> rows) {
+      var signalEnumerators = (from model in models
+                               select model.GetSignals(dataset, rows).GetEnumerator())
+                                       .ToList();
+
+      while (signalEnumerators.All(en => en.MoveNext())) {
+        yield return from enumerator in signalEnumerators
+                     select enumerator.Current;
+      }
+    }
+
+    #endregion
+
+    #region ITradingModel Members
+
+    public IEnumerable<double> GetSignals(Dataset dataset, IEnumerable<int> rows) {
+      throw new System.NotImplementedException();
+    }
+
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblem.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblem.cs	(revision 6125)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  [Item("Trading Problem", "A general trading problem.")]
+  [Creatable("Problems")]
+  public class TradingProblem : DataAnalysisProblem<ITradingProblemData>, ITradingProblem {
+    [StorableConstructor]
+    protected TradingProblem(bool deserializing) : base(deserializing) { }
+    protected TradingProblem(TradingProblem original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { 
+      return new TradingProblem(this, cloner); }
+
+    public TradingProblem()
+      : base() {
+      ProblemData = new TradingProblemData();
+    }
+
+    public override void ImportProblemDataFromFile(string fileName) {
+      TradingProblemData problemData = TradingProblemData.ImportFromFile(fileName);
+      ProblemData = problemData;
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs	(revision 6125)
@@ -0,0 +1,1664 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  [Item("TradingProblemData", "Represents an item containing all data defining a trading problem.")]
+  public sealed class TradingProblemData : DataAnalysisProblemData, ITradingProblemData {
+    private const string PriceVariableParameterName = "PriceVariable";
+    private const string TransactionCostsParameterName = "TransactionCosts";
+
+    #region default data
+    private static double[,] audInUsd = new double[,] {
+    { 0.0000},
+    { 0.0003},
+    {-0.0004},
+    { 0.0000},
+    { 0.0003},
+    { 0.0003},
+    {-0.0005},
+    { 0.0001},
+    { 0.0004},
+    { 0.0001},
+    {-0.0005},
+    {-0.0014},
+    {-0.0002},
+    { 0.0000},
+    { 0.0011},
+    { 0.0024},
+    {-0.0022},
+    {-0.0035},
+    { 0.0003},
+    { 0.0005},
+    { 0.0014},
+    {-0.0003},
+    { 0.0001},
+    { 0.0001},
+    { 0.0001},
+    { 0.0008},
+    {-0.0004},
+    { 0.0012},
+    { 0.0001},
+    {-0.0001},
+    { 0.0004},
+    {-0.0004},
+    {-0.0007},
+    {-0.0007},
+    {-0.0011},
+    { 0.0001},
+    {-0.0003},
+    {-0.0009},
+    { 0.0001},
+    {-0.0009},
+    { 0.0006},
+    { 0.0006},
+    {-0.0006},
+    { 0.0015},
+    { 0.0003},
+    {-0.0005},
+    {-0.0010},
+    {-0.0005},
+    { 0.0002},
+    {-0.0005},
+    {-0.0002},
+    {-0.0010},
+    { 0.0015},
+    { 0.0001},
+    {-0.0010},
+    {-0.0003},
+    { 0.0004},
+    {-0.0022},
+    { 0.0008},
+    {-0.0007},
+    { 0.0004},
+    { 0.0036},
+    {-0.0005},
+    { 0.0002},
+    { 0.0009},
+    {-0.0002},
+    { 0.0004},
+    { 0.0012},
+    {-0.0005},
+    { 0.0004},
+    {-0.0010},
+    {-0.0006},
+    {-0.0028},
+    { 0.0007},
+    { 0.0009},
+    { 0.0005},
+    {-0.0001},
+    { 0.0001},
+    {-0.0011},
+    { 0.0004},
+    { 0.0007},
+    {-0.0004},
+    { 0.0005},
+    {-0.0008},
+    {-0.0005},
+    {-0.0011},
+    { 0.0004},
+    {-0.0008},
+    { 0.0016},
+    { 0.0008},
+    {-0.0002},
+    { 0.0000},
+    {-0.0015},
+    { 0.0002},
+    {-0.0008},
+    {-0.0005},
+    {-0.0001},
+    { 0.0002},
+    { 0.0038},
+    { 0.0007},
+    {-0.0001},
+    { 0.0000},
+    { 0.0015},
+    { 0.0000},
+    { 0.0009},
+    {-0.0008},
+    {-0.0001},
+    {-0.0006},
+    { 0.0019},
+    {-0.0002},
+    { 0.0002},
+    {-0.0017},
+    {-0.0003},
+    {-0.0004},
+    {-0.0017},
+    { 0.0003},
+    { 0.0000},
+    { 0.0001},
+    { 0.0003},
+    { 0.0006},
+    {-0.0001},
+    {-0.0009},
+    { 0.0007},
+    { 0.0004},
+    { 0.0002},
+    { 0.0001},
+    {-0.0001},
+    {-0.0013},
+    { 0.0009},
+    { 0.0003},
+    { 0.0004},
+    { 0.0001},
+    { 0.0001},
+    { 0.0001},
+    { 0.0007},
+    { 0.0013},
+    { 0.0029},
+    {-0.0011},
+    { 0.0003},
+    { 0.0001},
+    { 0.0003},
+    {-0.0005},
+    { 0.0003},
+    { 0.0004},
+    { 0.0008},
+    {-0.0006},
+    { 0.0005},
+    {-0.0001},
+    { 0.0000},
+    { 0.0003},
+    { 0.0013},
+    { 0.0005},
+    { 0.0002},
+    { 0.0005},
+    {-0.0005},
+    { 0.0012},
+    {-0.0006},
+    { 0.0001},
+    {-0.0012},
+    { 0.0015},
+    {-0.0005},
+    {-0.0005},
+    { 0.0012},
+    {-0.0006},
+    {-0.0001},
+    {-0.0002},
+    { 0.0000},
+    { 0.0003},
+    {-0.0008},
+    { 0.0010},
+    { 0.0003},
+    {-0.0006},
+    { 0.0001},
+    {-0.0001},
+    { 0.0014},
+    {-0.0011},
+    {-0.0002},
+    {-0.0001},
+    { 0.0005},
+    { 0.0006},
+    {-0.0018},
+    {-0.0007},
+    {-0.0001},
+    {-0.0001},
+    { 0.0002},
+    {-0.0008},
+    { 0.0027},
+    { 0.0006},
+    {-0.0005},
+    {-0.0003},
+    {-0.0003},
+    {-0.0001},
+    { 0.0005},
+    { 0.0003},
+    { 0.0004},
+    { 0.0013},
+    { 0.0006},
+    { 0.0000},
+    { 0.0011},
+    { 0.0003},
+    {-0.0008},
+    {-0.0003},
+    { 0.0005},
+    {-0.0004},
+    {-0.0015},
+    {-0.0006},
+    { 0.0008},
+    { 0.0016},
+    {-0.0009},
+    { 0.0007},
+    {-0.0009},
+    {-0.0005},
+    { 0.0001},
+    { 0.0005},
+    { 0.0002},
+    {-0.0011},
+    { 0.0006},
+    {-0.0016},
+    {-0.0013},
+    {-0.0006},
+    {-0.0004},
+    {-0.0002},
+    {-0.0006},
+    { 0.0014},
+    { 0.0002},
+    {-0.0006},
+    {-0.0007},
+    {-0.0001},
+    {-0.0010},
+    {-0.0012},
+    { 0.0009},
+    {-0.0009},
+    {-0.0006},
+    { 0.0000},
+    { 0.0014},
+    {-0.0011},
+    {-0.0002},
+    {-0.0012},
+    {-0.0003},
+    { 0.0003},
+    {-0.0010},
+    {-0.0008},
+    { 0.0001},
+    {-0.0005},
+    {-0.0011},
+    { 0.0006},
+    {-0.0008},
+    { 0.0012},
+    { 0.0007},
+    {-0.0009},
+    { 0.0005},
+    { 0.0017},
+    { 0.0003},
+    {-0.0011},
+    { 0.0034},
+    {-0.0017},
+    {-0.0006},
+    {-0.0008},
+    { 0.0004},
+    {-0.0005},
+    {-0.0006},
+    { 0.0001},
+    { 0.0009},
+    {-0.0036},
+    {-0.0010},
+    { 0.0005},
+    { 0.0000},
+    { 0.0003},
+    {-0.0007},
+    { 0.0021},
+    { 0.0003},
+    { 0.0005},
+    { 0.0003},
+    {-0.0005},
+    {-0.0001},
+    {-0.0011},
+    {-0.0009},
+    { 0.0007},
+    { 0.0003},
+    { 0.0006},
+    { 0.0001},
+    {-0.0002},
+    { 0.0006},
+    { 0.0005},
+    { 0.0005},
+    {-0.0008},
+    {-0.0008},
+    { 0.0005},
+    { 0.0006},
+    {-0.0007},
+    { 0.0003},
+    { 0.0005},
+    { 0.0000},
+    { 0.0003},
+    { 0.0010},
+    {-0.0018},
+    { 0.0003},
+    {-0.0001},
+    { 0.0008},
+    {-0.0015},
+    {-0.0008},
+    { 0.0032},
+    { 0.0009},
+    { 0.0005},
+    {-0.0014},
+    {-0.0003},
+    { 0.0029},
+    { 0.0002},
+    {-0.0002},
+    {-0.0002},
+    { 0.0005},
+    { 0.0008},
+    {-0.0007},
+    { 0.0014},
+    {-0.0004},
+    {-0.0003},
+    { 0.0004},
+    {-0.0001},
+    {-0.0007},
+    { 0.0002},
+    { 0.0002},
+    { 0.0005},
+    { 0.0012},
+    {-0.0018},
+    { 0.0014},
+    { 0.0004},
+    { 0.0012},
+    { 0.0002},
+    { 0.0009},
+    {-0.0007},
+    { 0.0002},
+    { 0.0000},
+    {-0.0011},
+    {-0.0002},
+    { 0.0008},
+    {-0.0010},
+    { 0.0013},
+    {-0.0003},
+    {-0.0001},
+    {-0.0002},
+    { 0.0001},
+    { 0.0003},
+    {-0.0012},
+    { 0.0009},
+    {-0.0003},
+    { 0.0005},
+    {-0.0018},
+    { 0.0013},
+    { 0.0004},
+    { 0.0006},
+    { 0.0003},
+    {-0.0016},
+    {-0.0005},
+    { 0.0005},
+    { 0.0004},
+    { 0.0000},
+    {-0.0007},
+    {-0.0007},
+    { 0.0008},
+    {-0.0007},
+    { 0.0008},
+    { 0.0004},
+    { 0.0003},
+    { 0.0019},
+    { 0.0003},
+    {-0.0004},
+    { 0.0021},
+    {-0.0013},
+    { 0.0006},
+    {-0.0009},
+    { 0.0012},
+    { 0.0011},
+    { 0.0003},
+    { 0.0011},
+    {-0.0003},
+    {-0.0007},
+    { 0.0001},
+    { 0.0009},
+    {-0.0002},
+    {-0.0012},
+    {-0.0010},
+    {-0.0002},
+    {-0.0007},
+    {-0.0001},
+    {-0.0008},
+    { 0.0001},
+    { 0.0001},
+    { 0.0005},
+    { 0.0007},
+    {-0.0004},
+    {-0.0007},
+    {-0.0003},
+    {-0.0005},
+    { 0.0006},
+    { 0.0001},
+    {-0.0012},
+    {-0.0004},
+    { 0.0014},
+    {-0.0005},
+    { 0.0007},
+    {-0.0001},
+    {-0.0002},
+    { 0.0010},
+    {-0.0015},
+    {-0.0003},
+    { 0.0009},
+    { 0.0000},
+    {-0.0009},
+    { 0.0010},
+    { 0.0016},
+    {-0.0002},
+    {-0.0001},
+    {-0.0004},
+    {-0.0011},
+    { 0.0004},
+    { 0.0010},
+    {-0.0007},
+    {-0.0003},
+    {-0.0008},
+    {-0.0012},
+    { 0.0003},
+    { 0.0016},
+    {-0.0019},
+    {-0.0006},
+    { 0.0006},
+    { 0.0006},
+    {-0.0002},
+    {-0.0004},
+    { 0.0003},
+    { 0.0008},
+    {-0.0013},
+    {-0.0012},
+    {-0.0002},
+    {-0.0005},
+    { 0.0010},
+    {-0.0009},
+    {-0.0003},
+    { 0.0016},
+    {-0.0013},
+    { 0.0003},
+    { 0.0003},
+    {-0.0007},
+    { 0.0016},
+    { 0.0002},
+    {-0.0013},
+    {-0.0002},
+    {-0.0009},
+    {-0.0003},
+    { 0.0010},
+    { 0.0002},
+    { 0.0013},
+    {-0.0006},
+    {-0.0006},
+    { 0.0001},
+    {-0.0005},
+    { 0.0018},
+    { 0.0002},
+    { 0.0006},
+    {-0.0002},
+    {-0.0004},
+    { 0.0000},
+    { 0.0016},
+    {-0.0011},
+    {-0.0004},
+    { 0.0002},
+    { 0.0001},
+    { 0.0025},
+    {-0.0011},
+    {-0.0008},
+    { 0.0009},
+    {-0.0001},
+    {-0.0005},
+    {-0.0001},
+    { 0.0005},
+    { 0.0001},
+    {-0.0008},
+    {-0.0001},
+    { 0.0003},
+    { 0.0008},
+    {-0.0011},
+    { 0.0003},
+    { 0.0004},
+    { 0.0005},
+    { 0.0014},
+    {-0.0002},
+    { 0.0008},
+    { 0.0004},
+    { 0.0019},
+    {-0.0005},
+    {-0.0005},
+    {-0.0005},
+    { 0.0000},
+    {-0.0006},
+    { 0.0015},
+    {-0.0011},
+    {-0.0017},
+    {-0.0002},
+    { 0.0007},
+    { 0.0004},
+    {-0.0018},
+    {-0.0001},
+    {-0.0002},
+    {-0.0001},
+    { 0.0005},
+    {-0.0003},
+    { 0.0000},
+    { 0.0007},
+    { 0.0006},
+    {-0.0014},
+    { 0.0006},
+    {-0.0003},
+    { 0.0002},
+    {-0.0002},
+    {-0.0002},
+    { 0.0002},
+    {-0.0009},
+    {-0.0001},
+    {-0.0001},
+    { 0.0000},
+    { 0.0012},
+    { 0.0000},
+    { 0.0003},
+    {-0.0008},
+    { 0.0004},
+    { 0.0000},
+    {-0.0003},
+    {-0.0013},
+    {-0.0005},
+    {-0.0005},
+    {-0.0001},
+    {-0.0004},
+    { 0.0006},
+    { 0.0000},
+    {-0.0008},
+    {-0.0004},
+    {-0.0024},
+    { 0.0003},
+    {-0.0005},
+    { 0.0007},
+    { 0.0003},
+    {-0.0004},
+    {-0.0004},
+    { 0.0003},
+    { 0.0000},
+    { 0.0014},
+    {-0.0004},
+    { 0.0000},
+    {-0.0009},
+    { 0.0012},
+    {-0.0008},
+    { 0.0028},
+    { 0.0003},
+    { 0.0001},
+    { 0.0010},
+    {-0.0005},
+    { 0.0004},
+    {-0.0005},
+    { 0.0001},
+    {-0.0005},
+    { 0.0017},
+    {-0.0012},
+    {-0.0002},
+    { 0.0010},
+    {-0.0009},
+    {-0.0001},
+    { 0.0003},
+    { 0.0001},
+    { 0.0031},
+    {-0.0005},
+    { 0.0004},
+    { 0.0002},
+    {-0.0001},
+    {-0.0003},
+    {-0.0013},
+    {-0.0015},
+    {-0.0003},
+    { 0.0010},
+    { 0.0010},
+    {-0.0002},
+    { 0.0027},
+    { 0.0004},
+    { 0.0001},
+    {-0.0007},
+    { 0.0000},
+    {-0.0002},
+    { 0.0011},
+    {-0.0009},
+    {-0.0003},
+    {-0.0006},
+    { 0.0007},
+    {-0.0015},
+    { 0.0004},
+    {-0.0002},
+    { 0.0002},
+    { 0.0001},
+    {-0.0005},
+    { 0.0000},
+    { 0.0003},
+    {-0.0011},
+    { 0.0001},
+    {-0.0001},
+    { 0.0002},
+    {-0.0006},
+    { 0.0003},
+    {-0.0004},
+    {-0.0005},
+    {-0.0005},
+    { 0.0000},
+    { 0.0007},
+    {-0.0032},
+    { 0.0001},
+    { 0.0007},
+    {-0.0008},
+    {-0.0004},
+    {-0.0004},
+    {-0.0004},
+    { 0.0010},
+    {-0.0001},
+    {-0.0001},
+    { 0.0002},
+    { 0.0000},
+    { 0.0001},
+    {-0.0009},
+    {-0.0002},
+    {-0.0009},
+    {-0.0002},
+    { 0.0002},
+    { 0.0002},
+    { 0.0010},
+    { 0.0002},
+    {-0.0005},
+    {-0.0005},
+    {-0.0021},
+    { 0.0008},
+    { 0.0000},
+    { 0.0006},
+    {-0.0006},
+    {-0.0007},
+    { 0.0007},
+    {-0.0007},
+    { 0.0005},
+    { 0.0011},
+    {-0.0006},
+    {-0.0004},
+    { 0.0012},
+    { 0.0001},
+    { 0.0010},
+    {-0.0002},
+    {-0.0004},
+    {-0.0004},
+    {-0.0003},
+    {-0.0006},
+    { 0.0011},
+    { 0.0000},
+    { 0.0012},
+    { 0.0001},
+    {-0.0003},
+    { 0.0011},
+    { 0.0007},
+    {-0.0007},
+    { 0.0005},
+    {-0.0002},
+    { 0.0008},
+    { 0.0002},
+    { 0.0008},
+    {-0.0002},
+    { 0.0005},
+    { 0.0002},
+    {-0.0009},
+    { 0.0003},
+    {-0.0008},
+    { 0.0004},
+    {-0.0009},
+    { 0.0006},
+    { 0.0011},
+    { 0.0010},
+    { 0.0006},
+    {-0.0006},
+    { 0.0005},
+    { 0.0002},
+    {-0.0035},
+    { 0.0008},
+    {-0.0006},
+    {-0.0011},
+    { 0.0008},
+    {-0.0003},
+    {-0.0005},
+    { 0.0004},
+    { 0.0000},
+    { 0.0002},
+    {-0.0011},
+    { 0.0001},
+    {-0.0009},
+    { 0.0007},
+    {-0.0003},
+    { 0.0005},
+    {-0.0005},
+    { 0.0002},
+    {-0.0021},
+    {-0.0004},
+    { 0.0000},
+    { 0.0014},
+    {-0.0004},
+    {-0.0006},
+    {-0.0031},
+    {-0.0006},
+    { 0.0004},
+    { 0.0001},
+    {-0.0012},
+    {-0.0011},
+    { 0.0004},
+    {-0.0002},
+    { 0.0000},
+    {-0.0004},
+    {-0.0002},
+    { 0.0013},
+    {-0.0007},
+    {-0.0007},
+    { 0.0001},
+    { 0.0001},
+    {-0.0010},
+    { 0.0001},
+    { 0.0006},
+    {-0.0001},
+    {-0.0008},
+    {-0.0015},
+    {-0.0008},
+    {-0.0001},
+    { 0.0010},
+    {-0.0004},
+    { 0.0000},
+    {-0.0016},
+    { 0.0000},
+    { 0.0001},
+    {-0.0004},
+    {-0.0001},
+    { 0.0014},
+    {-0.0025},
+    {-0.0006},
+    {-0.0011},
+    {-0.0002},
+    {-0.0001},
+    {-0.0005},
+    {-0.0005},
+    {-0.0014},
+    { 0.0000},
+    {-0.0007},
+    { 0.0021},
+    { 0.0002},
+    {-0.0005},
+    {-0.0009},
+    {-0.0002},
+    { 0.0020},
+    { 0.0004},
+    {-0.0011},
+    {-0.0018},
+    { 0.0005},
+    { 0.0005},
+    { 0.0000},
+    { 0.0000},
+    { 0.0004},
+    { 0.0008},
+    {-0.0004},
+    {-0.0007},
+    { 0.0001},
+    { 0.0009},
+    {-0.0001},
+    { 0.0010},
+    {-0.0005},
+    {-0.0023},
+    { 0.0004},
+    { 0.0022},
+    {-0.0013},
+    { 0.0003},
+    {-0.0003},
+    {-0.0003},
+    { 0.0010},
+    {-0.0002},
+    { 0.0000},
+    { 0.0002},
+    {-0.0004},
+    {-0.0007},
+    {-0.0005},
+    {-0.0003},
+    { 0.0005},
+    {-0.0010},
+    {-0.0004},
+    { 0.0001},
+    { 0.0003},
+    { 0.0000},
+    { 0.0008},
+    { 0.0001},
+    { 0.0004},
+    { 0.0002},
+    { 0.0001},
+    {-0.0005},
+    {-0.0005},
+    {-0.0003},
+    { 0.0016},
+    { 0.0006},
+    {-0.0014},
+    { 0.0016},
+    { 0.0016},
+    { 0.0009},
+    {-0.0002},
+    {-0.0002},
+    { 0.0005},
+    {-0.0005},
+    {-0.0004},
+    {-0.0008},
+    {-0.0003},
+    {-0.0001},
+    { 0.0005},
+    {-0.0002},
+    {-0.0004},
+    {-0.0003},
+    { 0.0003},
+    { 0.0003},
+    {-0.0003},
+    { 0.0003},
+    {-0.0004},
+    { 0.0000},
+    {-0.0008},
+    {-0.0013},
+    { 0.0007},
+    {-0.0011},
+    { 0.0015},
+    {-0.0008},
+    { 0.0007},
+    {-0.0002},
+    {-0.0004},
+    { 0.0005},
+    {-0.0008},
+    { 0.0000},
+    {-0.0008},
+    { 0.0007},
+    { 0.0007},
+    { 0.0011},
+    { 0.0000},
+    { 0.0003},
+    {-0.0005},
+    { 0.0003},
+    { 0.0012},
+    { 0.0005},
+    {-0.0006},
+    {-0.0002},
+    {-0.0007},
+    {-0.0027},
+    {-0.0012},
+    {-0.0005},
+    { 0.0005},
+    { 0.0002},
+    { 0.0001},
+    { 0.0003},
+    { 0.0003},
+    { 0.0002},
+    {-0.0002},
+    {-0.0003},
+    { 0.0009},
+    { 0.0003},
+    { 0.0003},
+    { 0.0006},
+    {-0.0002},
+    {-0.0003},
+    {-0.0004},
+    { 0.0011},
+    { 0.0000},
+    { 0.0000},
+    { 0.0000},
+    {-0.0007},
+    { 0.0001},
+    { 0.0019},
+    { 0.0011},
+    {-0.0011},
+    { 0.0002},
+    { 0.0009},
+    { 0.0002},
+    { 0.0004},
+    {-0.0001},
+    {-0.0008},
+    { 0.0001},
+    { 0.0003},
+    {-0.0002},
+    {-0.0002},
+    { 0.0002},
+    { 0.0003},
+    { 0.0000},
+    { 0.0010},
+    { 0.0013},
+    {-0.0004},
+    {-0.0009},
+    {-0.0005},
+    { 0.0018},
+    { 0.0018},
+    {-0.0006},
+    {-0.0006},
+    {-0.0009},
+    { 0.0005},
+    {-0.0004},
+    {-0.0001},
+    { 0.0012},
+    {-0.0002},
+    {-0.0006},
+    {-0.0024},
+    {-0.0002},
+    {-0.0011},
+    { 0.0003},
+    { 0.0009},
+    { 0.0002},
+    { 0.0002},
+    { 0.0003},
+    {-0.0002},
+    {-0.0002},
+    { 0.0000},
+    { 0.0000},
+    {-0.0010},
+    {-0.0007},
+    { 0.0009},
+    { 0.0001},
+    { 0.0020},
+    { 0.0001},
+    { 0.0005},
+    {-0.0003},
+    { 0.0004},
+    {-0.0005},
+    { 0.0005},
+    { 0.0002},
+    { 0.0001},
+    { 0.0001},
+    { 0.0004},
+    { 0.0008},
+    { 0.0000},
+    {-0.0008},
+    { 0.0002},
+    {-0.0012},
+    {-0.0004},
+    { 0.0004},
+    {-0.0001},
+    { 0.0010},
+    {-0.0009},
+    {-0.0007},
+    {-0.0006},
+    {-0.0002},
+    { 0.0001},
+    {-0.0004},
+    { 0.0002},
+    { 0.0000},
+    { 0.0000},
+    {-0.0012},
+    {-0.0002},
+    {-0.0002},
+    { 0.0009},
+    {-0.0008},
+    {-0.0001},
+    { 0.0008},
+    {-0.0001},
+    {-0.0002},
+    {-0.0004},
+    { 0.0009},
+    { 0.0001},
+    { 0.0005},
+    { 0.0015},
+    {-0.0001},
+    {-0.0002},
+    {-0.0004},
+    { 0.0009},
+    {-0.0010},
+    {-0.0005},
+    { 0.0004},
+    { 0.0011},
+    { 0.0009},
+    {-0.0003},
+    {-0.0002},
+    { 0.0006},
+    { 0.0003},
+    {-0.0003},
+    {-0.0002},
+    { 0.0015},
+    { 0.0003},
+    { 0.0001},
+    {-0.0001},
+    {-0.0001},
+    {-0.0005},
+    {-0.0001},
+    { 0.0003},
+    { 0.0002},
+    { 0.0001},
+    {-0.0002},
+    {-0.0008},
+    { 0.0003},
+    {-0.0001},
+    { 0.0000},
+    { 0.0002},
+    {-0.0002},
+    {-0.0001},
+    {-0.0005},
+    { 0.0002},
+    { 0.0000},
+    { 0.0000},
+    { 0.0004},
+    { 0.0000},
+    {-0.0013},
+    {-0.0043},
+    { 0.0007},
+    { 0.0001},
+    {-0.0007},
+    {-0.0001},
+    { 0.0003},
+    { 0.0013},
+    { 0.0005},
+    {-0.0007},
+    { 0.0002},
+    {-0.0014},
+    {-0.0002},
+    { 0.0000},
+    { 0.0020},
+    { 0.0009},
+    {-0.0018},
+    {-0.0005},
+    {-0.0009},
+    {-0.0005},
+    { 0.0008},
+    { 0.0005},
+    {-0.0004},
+    { 0.0004},
+    { 0.0001},
+    { 0.0003},
+    { 0.0003},
+    {-0.0008},
+    {-0.0007},
+    { 0.0008},
+    {-0.0004},
+    {-0.0028},
+    {-0.0006},
+    {-0.0022},
+    {-0.0009},
+    { 0.0003},
+    { 0.0003},
+    { 0.0000},
+    { 0.0021},
+    {-0.0017},
+    { 0.0009},
+    {-0.0001},
+    {-0.0005},
+    {-0.0015},
+    { 0.0009},
+    { 0.0009},
+    {-0.0009},
+    { 0.0010},
+    { 0.0000},
+    { 0.0018},
+    {-0.0011},
+    { 0.0001},
+    {-0.0008},
+    { 0.0009},
+    { 0.0022},
+    { 0.0011},
+    {-0.0002},
+    {-0.0018},
+    { 0.0019},
+    {-0.0004},
+    {-0.0004},
+    { 0.0002},
+    { 0.0027},
+    {-0.0012},
+    {-0.0003},
+    {-0.0002},
+    { 0.0013},
+    { 0.0002},
+    {-0.0003},
+    { 0.0002},
+    { 0.0003},
+    {-0.0002},
+    { 0.0020},
+    {-0.0003},
+    { 0.0002},
+    {-0.0001},
+    {-0.0001},
+    { 0.0006},
+    {-0.0012},
+    { 0.0011},
+    { 0.0001},
+    { 0.0001},
+    { 0.0004},
+    {-0.0002},
+    { 0.0029},
+    {-0.0016},
+    { 0.0005},
+    {-0.0029},
+    {-0.0002},
+    { 0.0013},
+    { 0.0011},
+    {-0.0003},
+    { 0.0002},
+    { 0.0001},
+    { 0.0001},
+    {-0.0005},
+    { 0.0000},
+    { 0.0009},
+    { 0.0016},
+    { 0.0005},
+    { 0.0003},
+    { 0.0004},
+    {-0.0001},
+    { 0.0020},
+    { 0.0006},
+    {-0.0006},
+    {-0.0004},
+    { 0.0012},
+    { 0.0012},
+    { 0.0017},
+    { 0.0017},
+    {-0.0004},
+    { 0.0001},
+    { 0.0001},
+    {-0.0006},
+    {-0.0003},
+    { 0.0004},
+    { 0.0008},
+    {-0.0014},
+    { 0.0011},
+    {-0.0003},
+    { 0.0004},
+    {-0.0001},
+    { 0.0017},
+    { 0.0008},
+    { 0.0005},
+    {-0.0002},
+    { 0.0001},
+    {-0.0013},
+    { 0.0009},
+    {-0.0008},
+    {-0.0003},
+    { 0.0013},
+    {-0.0002},
+    {-0.0004},
+    { 0.0007},
+    {-0.0009},
+    { 0.0002},
+    {-0.0002},
+    {-0.0006},
+    { 0.0003},
+    {-0.0003},
+    {-0.0004},
+    {-0.0006},
+    {-0.0004},
+    { 0.0006},
+    {-0.0006},
+    { 0.0019},
+    {-0.0012},
+    {-0.0002},
+    { 0.0003},
+    { 0.0001},
+    { 0.0001},
+    { 0.0002},
+    { 0.0004},
+    { 0.0000},
+    {-0.0013},
+    {-0.0017},
+    {-0.0017},
+    {-0.0006},
+    {-0.0003},
+    { 0.0006},
+    { 0.0001},
+    { 0.0007},
+    {-0.0004},
+    { 0.0000},
+    { 0.0019},
+    {-0.0008},
+    {-0.0006},
+    { 0.0003},
+    {-0.0004},
+    {-0.0002},
+    { 0.0008},
+    {-0.0007},
+    {-0.0004},
+    {-0.0001},
+    {-0.0004},
+    {-0.0003},
+    { 0.0004},
+    {-0.0008},
+    { 0.0015},
+    { 0.0011},
+    {-0.0013},
+    {-0.0003},
+    { 0.0000},
+    { 0.0006},
+    {-0.0003},
+    {-0.0003},
+    { 0.0005},
+    {-0.0016},
+    { 0.0005},
+    {-0.0002},
+    {-0.0009},
+    {-0.0001},
+    {-0.0004},
+    { 0.0007},
+    { 0.0004},
+    { 0.0015},
+    { 0.0005},
+    {-0.0007},
+    { 0.0002},
+    {-0.0007},
+    {-0.0009},
+    {-0.0029},
+    { 0.0003},
+    {-0.0002},
+    {-0.0010},
+    {-0.0001},
+    { 0.0005},
+    {-0.0003},
+    { 0.0002},
+    {-0.0006},
+    { 0.0008},
+    {-0.0010},
+    { 0.0005},
+    { 0.0003},
+    { 0.0009},
+    { 0.0002},
+    { 0.0001},
+    { 0.0002},
+    {-0.0010},
+    {-0.0017},
+    { 0.0004},
+    {-0.0007},
+    { 0.0019},
+    {-0.0001},
+    {-0.0004},
+    {-0.0023},
+    { 0.0015},
+    { 0.0009},
+    {-0.0006},
+    {-0.0001},
+    { 0.0000},
+    { 0.0001},
+    { 0.0003},
+    {-0.0002},
+    { 0.0039},
+    {-0.0007},
+    { 0.0000},
+    {-0.0002},
+    {-0.0005},
+    { 0.0007},
+    { 0.0010},
+    {-0.0004},
+    { 0.0006},
+    {-0.0003},
+    {-0.0006},
+    { 0.0003},
+    { 0.0022},
+    {-0.0030},
+    { 0.0010},
+    { 0.0005},
+    { 0.0000},
+    {-0.0005},
+    {-0.0004},
+    {-0.0010},
+    {-0.0001},
+    { 0.0000},
+    {-0.0002},
+    { 0.0003},
+    {-0.0003},
+    {-0.0007},
+    {-0.0001},
+    { 0.0016},
+    {-0.0009},
+    { 0.0001},
+    { 0.0005},
+    { 0.0016},
+    {-0.0013},
+    {-0.0003},
+    {-0.0002},
+    { 0.0014},
+    {-0.0008},
+    { 0.0026},
+    {-0.0003},
+    { 0.0007},
+    { 0.0011},
+    { 0.0005},
+    {-0.0001},
+    { 0.0004},
+    {-0.0003},
+    { 0.0006},
+    {-0.0013},
+    { 0.0002},
+    {-0.0003},
+    {-0.0010},
+    { 0.0000},
+    {-0.0007},
+    {-0.0001},
+    { 0.0008},
+    {-0.0010},
+    {-0.0005},
+    { 0.0010},
+    { 0.0013},
+    { 0.0008},
+    {-0.0004},
+    { 0.0020},
+    {-0.0002},
+    { 0.0005},
+    { 0.0003},
+    { 0.0004},
+    { 0.0005},
+    { 0.0007},
+    {-0.0008},
+    { 0.0003},
+    {-0.0008},
+    { 0.0011},
+    { 0.0005},
+    { 0.0002},
+    {-0.0005},
+    {-0.0011},
+    { 0.0001},
+    {-0.0002},
+    {-0.0003},
+    { 0.0016},
+    {-0.0005},
+    {-0.0002},
+    {-0.0008},
+    { 0.0023},
+    { 0.0015},
+    { 0.0001},
+    {-0.0004},
+    { 0.0015},
+    {-0.0002},
+    { 0.0003},
+    { 0.0001},
+    { 0.0002},
+    {-0.0007},
+    { 0.0005},
+    {-0.0001},
+    { 0.0007},
+    {-0.0007},
+    { 0.0018},
+    {-0.0002},
+    { 0.0005},
+    {-0.0002},
+    {-0.0004},
+    {-0.0001},
+    {-0.0001},
+    { 0.0002},
+    { 0.0009},
+    { 0.0003},
+    {-0.0006},
+    {-0.0003},
+    {-0.0022},
+    { 0.0002},
+    { 0.0004},
+    { 0.0004},
+    {-0.0005},
+    {-0.0008},
+    {-0.0001},
+    { 0.0000},
+    { 0.0010},
+    { 0.0001},
+    {-0.0005},
+    {-0.0003},
+    {-0.0005},
+    { 0.0005},
+    {-0.0003},
+    { 0.0000},
+    { 0.0002},
+    { 0.0001},
+    {-0.0014},
+    {-0.0005},
+    {-0.0001},
+    { 0.0006},
+    { 0.0004},
+    { 0.0005},
+    { 0.0017},
+    { 0.0009},
+    { 0.0008},
+    { 0.0017},
+    { 0.0006},
+    {-0.0003},
+    { 0.0004},
+    { 0.0000},
+    {-0.0015},
+    {-0.0001},
+    { 0.0000},
+    {-0.0008},
+    { 0.0000},
+    { 0.0004},
+    {-0.0006},
+    { 0.0001},
+    { 0.0001},
+    { 0.0003},
+    {-0.0001},
+    { 0.0001},
+    {-0.0011},
+    {-0.0011},
+    { 0.0010},
+    { 0.0004},
+    { 0.0008},
+    { 0.0007},
+    { 0.0004},
+    {-0.0023},
+    { 0.0023},
+    {-0.0001},
+    {-0.0004},
+    { 0.0000},
+    {-0.0003},
+    {-0.0008},
+    { 0.0005},
+    { 0.0004},
+    {-0.0004},
+    { 0.0001},
+    {-0.0007},
+    {-0.0001},
+    {-0.0006},
+    {-0.0012},
+    {-0.0027},
+    { 0.0002},
+    {-0.0012},
+    { 0.0013},
+    { 0.0000},
+    {-0.0008},
+    { 0.0009},
+    {-0.0015},
+    { 0.0007},
+    { 0.0002},
+    { 0.0001},
+    {-0.0013},
+    { 0.0002},
+    {-0.0004},
+    {-0.0002},
+    {-0.0027},
+    { 0.0013},
+    {-0.0005},
+    { 0.0006},
+    { 0.0000},
+    {-0.0005},
+    { 0.0011},
+    { 0.0000},
+    {-0.0003},
+    { 0.0018},
+    {-0.0003},
+    { 0.0006},
+    {-0.0008},
+    {-0.0006},
+    {-0.0015},
+    {-0.0009},
+    {-0.0017},
+    { 0.0005},
+    { 0.0007},
+    {-0.0006},
+    {-0.0004},
+    { 0.0016},
+    { 0.0000},
+    { 0.0003},
+    {-0.0019},
+    { 0.0003},
+    { 0.0005},
+    { 0.0003},
+    { 0.0001},
+    {-0.0002},
+    { 0.0007},
+    { 0.0001},
+    {-0.0012},
+    { 0.0008},
+    {-0.0011},
+    { 0.0008},
+    { 0.0010},
+    {-0.0003},
+    {-0.0003},
+    {-0.0006},
+    {-0.0004},
+    { 0.0000},
+    { 0.0011},
+    { 0.0003},
+    {-0.0005},
+    {-0.0002},
+    { 0.0001},
+    {-0.0004},
+    { 0.0008},
+    {-0.0007},
+    {-0.0005},
+    {-0.0005},
+    {-0.0003},
+    {-0.0005},
+    { 0.0006},
+    {-0.0014},
+    {-0.0001},
+    { 0.0003},
+    { 0.0009},
+    { 0.0012},
+    {-0.0023},
+    {-0.0004},
+    { 0.0002},
+    { 0.0001},
+    {-0.0019},
+    { 0.0012},
+    {-0.0022},
+    { 0.0001},
+    {-0.0004},
+    {-0.0001},
+    { 0.0012},
+    { 0.0001},
+    { 0.0000},
+    { 0.0004},
+    {-0.0008},
+    { 0.0006},
+    {-0.0007},
+    { 0.0008},
+    {-0.0009},
+    {-0.0005},
+    {-0.0001},
+    {-0.0004},
+    { 0.0001},
+    {-0.0005},
+    {-0.0004},
+    {-0.0012},
+    { 0.0002},
+    { 0.0011},
+    { 0.0008},
+    {-0.0009},
+    { 0.0010},
+    {-0.0003},
+    {-0.0006},
+    { 0.0005},
+    { 0.0002},
+    {-0.0003},
+    { 0.0016},
+    {-0.0006},
+    { 0.0000},
+    { 0.0008},
+    {-0.0002},
+    { 0.0000},
+    { 0.0000},
+    { 0.0003},
+    {-0.0011},
+    {-0.0009},
+    {-0.0013},
+    {-0.0003},
+    { 0.0009},
+    { 0.0007},
+    {-0.0005},
+    { 0.0012},
+    {-0.0009},
+    { 0.0004},
+    {-0.0008},
+    {-0.0011},
+    { 0.0013},
+    { 0.0013},
+    { 0.0005 }};
+
+    private static Dataset defaultDataset;
+    private static IEnumerable<string> defaultAllowedInputVariables;
+    private static string defaultPriceVariable;
+
+    static TradingProblemData() {
+      defaultDataset = new Dataset(new string[] { "AUD" }, audInUsd);
+      defaultDataset.Name = "AUD in USD";
+      defaultDataset.Description = "Price of Australian dollar in US dollar.";
+      defaultAllowedInputVariables = new List<string>() { "AUD" };
+      defaultPriceVariable = "AUD";
+    }
+    #endregion
+
+    public IValueParameter<StringValue> PriceVariableParameter {
+      get { return (IValueParameter<StringValue>)Parameters[PriceVariableParameterName]; }
+    }
+    public IValueParameter<DoubleValue> TransactionCostsParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters[TransactionCostsParameterName]; }
+    }
+    public string PriceVariable {
+      get { return PriceVariableParameter.Value.Value; }
+    }
+    public double TransactionCosts {
+      get { return TransactionCostsParameter.Value.Value; }
+    }
+
+    [StorableConstructor]
+    private TradingProblemData(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterParameterEvents();
+    }
+
+    private TradingProblemData(TradingProblemData original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterParameterEvents();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new TradingProblemData(this, cloner); }
+
+    public TradingProblemData()
+      : this(defaultDataset, defaultAllowedInputVariables, defaultPriceVariable) {
+    }
+
+    public TradingProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
+      : base(dataset, allowedInputVariables) {
+      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
+      Parameters.Add(new ConstrainedValueParameter<StringValue>(PriceVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First()));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(TransactionCostsParameterName, "The absolute cost of on buy/sell transaction (assumed to be constant and independent of transaction volume)", new DoubleValue(0.0002)));
+      RegisterParameterEvents();
+    }
+
+    private void RegisterParameterEvents() {
+      PriceVariableParameter.ValueChanged += new EventHandler(PriceVariableParameter_ValueChanged);
+      TransactionCostsParameter.Value.ValueChanged += new EventHandler(TransactionCostsParameter_ValueChanged);
+    }
+
+    private void TransactionCostsParameter_ValueChanged(object sender, EventArgs e) {
+      OnChanged();
+    }
+    private void PriceVariableParameter_ValueChanged(object sender, EventArgs e) {
+      OnChanged();
+    }
+
+    #region Import from file
+    public static TradingProblemData ImportFromFile(string fileName) {
+      TableFileParser csvFileParser = new TableFileParser();
+      csvFileParser.Parse(fileName);
+
+      Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
+      dataset.Name = Path.GetFileName(fileName);
+
+      TradingProblemData problemData = new TradingProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
+      problemData.Name = "Data imported from " + Path.GetFileName(fileName);
+      return problemData;
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingSolution.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingSolution.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingSolution.cs	(revision 6125)
@@ -0,0 +1,117 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  /// <summary>
+  /// Abstract base class for trading data analysis solutions
+  /// </summary>
+  [StorableClass]
+  public abstract class TradingSolution : DataAnalysisSolution, ITradingSolution {
+    private const string TrainingSharpeRatioResultName = "Sharpe ratio (training)";
+    private const string TestSharpeRatioResultName = "Sharpe ratio (test)";
+
+    public new ITradingModel Model {
+      get { return (ITradingModel)base.Model; }
+      protected set { base.Model = value; }
+    }
+
+    public new ITradingProblemData ProblemData {
+      get { return (ITradingProblemData)base.ProblemData; }
+      protected set { base.ProblemData = value; }
+    }
+
+    public double TrainingSharpeRatio {
+      get { return ((DoubleValue)this[TrainingSharpeRatioResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingSharpeRatioResultName].Value).Value = value; }
+    }
+
+    public double TestSharpeRatio {
+      get { return ((DoubleValue)this[TestSharpeRatioResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestSharpeRatioResultName].Value).Value = value; }
+    }
+
+    [StorableConstructor]
+    protected TradingSolution(bool deserializing) : base(deserializing) { }
+    protected TradingSolution(TradingSolution original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public TradingSolution(ITradingModel model, ITradingProblemData problemData)
+      : base(model, problemData) {
+      Add(new Result(TrainingSharpeRatioResultName, "Share ratio of the signals of the model on the training partition", new DoubleValue()));
+      Add(new Result(TestSharpeRatioResultName, "Sharpe ratio of the signals of the model on the test partition", new DoubleValue()));
+
+      RecalculateResults();
+    }
+
+    protected override void OnProblemDataChanged(EventArgs e) {
+      base.OnProblemDataChanged(e);
+      RecalculateResults();
+    }
+    protected override void OnModelChanged(EventArgs e) {
+      base.OnModelChanged(e);
+      RecalculateResults();
+    }
+
+    protected void RecalculateResults() {
+      double[] trainingSignals = TrainingSignals.ToArray(); // cache values
+      IEnumerable<double> trainingReturns = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.PriceVariable, ProblemData.TrainingIndizes);
+      double[] testSignals = TestSignals.ToArray(); // cache values
+      IEnumerable<double> testReturns = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.PriceVariable, ProblemData.TestIndizes);
+    
+      OnlineCalculatorError errorState;
+      double trainingSharpeRatio = OnlineSharpeRatioCalculator.Calculate(trainingReturns, trainingSignals, ProblemData.TransactionCosts, out errorState);
+      TrainingSharpeRatio = errorState == OnlineCalculatorError.None ? trainingSharpeRatio : double.NaN;
+      double testSharpeRatio = OnlineSharpeRatioCalculator.Calculate(testReturns, testSignals, ProblemData.TransactionCosts, out errorState);
+      TestSharpeRatio = errorState == OnlineCalculatorError.None ? testSharpeRatio : double.NaN;
+
+    }
+
+    public virtual IEnumerable<double> Signals {
+      get {
+        return GetSignals(Enumerable.Range(0, ProblemData.Dataset.Rows));
+      }
+    }
+
+    public virtual IEnumerable<double> TrainingSignals {
+      get {
+        return GetSignals(ProblemData.TrainingIndizes);
+      }
+    }
+
+    public virtual IEnumerable<double> TestSignals {
+      get {
+        return GetSignals(ProblemData.TestIndizes);
+      }
+    }
+
+    public virtual IEnumerable<double> GetSignals(IEnumerable<int> rows) {
+      return Model.GetSignals(ProblemData.Dataset, rows);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.Designer.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.Designer.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.Designer.cs	(revision 6125)
@@ -0,0 +1,84 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading.Views {
+  partial class SymbolicTradingSolutionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.itemsGroupBox.SuspendLayout();
+      this.detailsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // splitContainer
+      // 
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Size = new System.Drawing.Size(480, 275);
+      this.splitContainer.SplitterDistance = 255;
+      // 
+      // itemsGroupBox
+      // 
+      this.itemsGroupBox.Size = new System.Drawing.Size(486, 294);
+      // 
+      // itemsListView
+      // 
+      this.itemsListView.Size = new System.Drawing.Size(249, 238);
+      // 
+      // detailsGroupBox
+      // 
+      this.detailsGroupBox.Size = new System.Drawing.Size(215, 246);
+      // 
+      // addButton
+      // 
+      this.toolTip.SetToolTip(this.addButton, "Add");
+      // 
+      // removeButton
+      // 
+      this.toolTip.SetToolTip(this.removeButton, "Remove");
+      // 
+      // viewHost
+      // 
+      this.viewHost.Size = new System.Drawing.Size(203, 221);
+      
+      // 
+      // SymbolicRegressionSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Name = "SymbolicRegressionSolutionView";
+      this.Size = new System.Drawing.Size(486, 294);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.itemsGroupBox.ResumeLayout(false);
+      this.detailsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/SymbolicTradingSolutionView.cs	(revision 6125)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Trading.Views {
+  [Content(typeof(SymbolicTradingSolution), true)]
+  [View("SymbolicTradingSolution View")]
+  public partial class SymbolicTradingSolutionView : TradingSolutionView {
+    public SymbolicTradingSolutionView() {
+      InitializeComponent();
+    }
+
+    protected new SymbolicTradingSolution Content {
+      get { return (SymbolicTradingSolution)base.Content; }
+      set { base.Content = value; }
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.Designer.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.Designer.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.Designer.cs	(revision 6125)
@@ -0,0 +1,84 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class TradingSolutionLineChartView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      chartArea1.Name = "ChartArea";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Dock = System.Windows.Forms.DockStyle.Fill;
+      legend1.Alignment = System.Drawing.StringAlignment.Center;
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.Name = "Default";
+      this.chart.Legends.Add(legend1);
+      this.chart.Location = new System.Drawing.Point(0, 0);
+      this.chart.Name = "chart";
+      this.chart.Size = new System.Drawing.Size(358, 225);
+      this.chart.TabIndex = 0;
+      this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Chart_MouseDoubleClick);
+      // 
+      // LineChartView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.chart);
+      this.Name = "LineChartView";
+      this.Size = new System.Drawing.Size(358, 225);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionLineChartView.cs	(revision 6125)
@@ -0,0 +1,156 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Line Chart")]
+  [Content(typeof(ITradingSolution))]
+  public partial class TradingSolutionLineChartView : ItemView, ITradingSolutionEvaluationView {
+    private const string PRICEVARIABLE_SERIES_NAME = "PriceVariable";
+    private const string SIGNALS_SERIES_NAME = "Signals";
+
+    public new ITradingSolution Content {
+      get { return (ITradingSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public TradingSolutionLineChartView()
+      : base() {
+      InitializeComponent();
+      //configure axis
+      this.chart.CustomizeAllChartAreas();
+      this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].CursorX.Interval = 1;
+
+      this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
+      this.chart.ChartAreas[0].CursorY.Interval = 0;
+    }
+
+    private void RedrawChart() {
+      this.chart.Series.Clear();
+      if (Content != null) {
+        this.chart.Series.Add(PRICEVARIABLE_SERIES_NAME);
+        this.chart.Series[PRICEVARIABLE_SERIES_NAME].LegendText = Content.ProblemData.PriceVariable;
+        this.chart.Series[PRICEVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[PRICEVARIABLE_SERIES_NAME].Points.DataBindY(Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.PriceVariable));
+        this.UpdateStripLines();
+
+        this.chart.Series.Add(SIGNALS_SERIES_NAME);
+        this.chart.Series[SIGNALS_SERIES_NAME].LegendText = Content.ItemName;
+        this.chart.Series[SIGNALS_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[SIGNALS_SERIES_NAME].Points.DataBindY(Content.Signals.ToArray());
+        this.chart.Series[SIGNALS_SERIES_NAME].Tag = Content;
+        UpdateCursorInterval();
+      }
+    }
+
+    private void UpdateCursorInterval() {
+      var estimatedValues = this.chart.Series[SIGNALS_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
+      var targetValues = this.chart.Series[PRICEVARIABLE_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
+      double estimatedValuesRange = estimatedValues.Max() - estimatedValues.Min();
+      double targetValuesRange = targetValues.Max() - targetValues.Min();
+      double interestingValuesRange = Math.Min(Math.Max(targetValuesRange, 1.0), Math.Max(estimatedValuesRange, 1.0));
+      double digits = (int)Math.Log10(interestingValuesRange) - 3;
+      double yZoomInterval = Math.Max(Math.Pow(10, digits), 10E-5);
+      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      UpdateEstimatedValuesLineChart();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      RedrawChart();
+    }
+
+    private void UpdateEstimatedValuesLineChart() {
+      if (InvokeRequired) Invoke((Action)UpdateEstimatedValuesLineChart);
+      else {
+        if (this.chart.Series.Count > 0) {
+          Series s = this.chart.Series.SingleOrDefault(x => x.Tag == Content);
+          if (s != null) {
+            s.Points.DataBindY(Content.Signals.ToArray());
+            s.LegendText = Content.ItemName;
+            this.UpdateStripLines();
+            UpdateCursorInterval();
+          }
+        }
+      }
+    }
+
+    private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartArea != null && (result.ChartElementType == ChartElementType.PlottingArea ||
+                                       result.ChartElementType == ChartElementType.Gridlines) ||
+                                       result.ChartElementType == ChartElementType.StripLines) {
+        foreach (var axis in result.ChartArea.Axes)
+          axis.ScaleView.ZoomReset(int.MaxValue);
+      }
+    }
+    #endregion
+
+    private void UpdateStripLines() {
+      this.chart.ChartAreas[0].AxisX.StripLines.Clear();
+      this.CreateAndAddStripLine("Training", Color.FromArgb(20, Color.Green),
+        Content.ProblemData.TrainingPartition.Start,
+        Content.ProblemData.TrainingPartition.End);
+      this.CreateAndAddStripLine("Test", Color.FromArgb(20, Color.Red),
+        Content.ProblemData.TestPartition.Start,
+        Content.ProblemData.TestPartition.End);
+    }
+
+    private void CreateAndAddStripLine(string title, Color c, int start, int end) {
+      StripLine stripLine = new StripLine();
+      stripLine.BackColor = c;
+      stripLine.Text = title;
+      stripLine.Font = new Font("Times New Roman", 12, FontStyle.Bold);
+      stripLine.StripWidth = end - start;
+      stripLine.IntervalOffset = start;
+      this.chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.Designer.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.Designer.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.Designer.cs	(revision 6125)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class TradingSolutionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.itemsGroupBox.SuspendLayout();
+      this.detailsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // splitContainer
+      // 
+      // 
+      // itemsGroupBox
+      // 
+      this.itemsGroupBox.Text = "Regression Solution";
+      // 
+      // addButton
+      // 
+      this.toolTip.SetToolTip(this.addButton, "Add");
+      // 
+      // removeButton
+      // 
+      this.toolTip.SetToolTip(this.removeButton, "Remove");
+      // 
+      // RegressionSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "RegressionSolutionView";
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.itemsGroupBox.ResumeLayout(false);
+      this.detailsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.cs
===================================================================
--- /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.cs	(revision 6125)
+++ /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Views/TradingSolutionView.cs	(revision 6125)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("TradingSolution View")]
+  [Content(typeof(TradingSolution), true)]
+  public partial class TradingSolutionView : DataAnalysisSolutionView {
+    public TradingSolutionView() {
+      InitializeComponent();
+
+      var regressionSolutionEvaluationViewTypes = ApplicationManager.Manager.GetTypes(typeof(ITradingSolutionEvaluationView), true);
+      foreach (Type viewType in regressionSolutionEvaluationViewTypes)
+        AddViewListViewItem(viewType);
+    }
+
+    public new TradingSolution Content {
+      get { return (TradingSolution)base.Content; }
+      set { base.Content = value; }
+    }
+  }
+}
