Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9992 for trunk/sources


Ignore:
Timestamp:
09/19/13 13:24:08 (11 years ago)
Author:
gkronber
Message:

#1508

  • disabled "Variable" symbol in default time series grammar
  • in the line chart use two different axis to display signals and prices
  • in the line chart display profits for training and test partitions separately
  • fixed hard-coded strings in SolutionView
  • added plugin dependency
Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r9459 r9992  
    251251      Symbols.First(s => s.Name == SpecialFunctionsName).Enabled = false;
    252252
    253 
     253      Symbols.Single(s => s.Name == "Variable").Enabled = false;
    254254      Symbols.First(s => s.Name == TimeSeriesSymbolsName).Enabled = true;
    255255      Symbols.First(s => s is Derivative).Enabled = false;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionLineChartView.cs

    r9991 r9992  
    5353      this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
    5454      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
     55      this.chart.ChartAreas[0].AxisY2.ScaleView.Zoomable = false;
    5556      this.chart.ChartAreas[0].CursorY.Interval = 0;
    5657    }
     
    5960      this.chart.Series.Clear();
    6061      if (Content != null) {
     62        var trainingRows = Content.ProblemData.TrainingIndices;
     63        var testRows = Content.ProblemData.TestIndices;
    6164        this.chart.Series.Add(SIGNALS_SERIES_NAME);
    6265        this.chart.Series[SIGNALS_SERIES_NAME].LegendText = SIGNALS_SERIES_NAME;
    6366        this.chart.Series[SIGNALS_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    64         this.chart.Series[SIGNALS_SERIES_NAME].Points.DataBindY(Content.Signals.ToArray());
     67        this.chart.Series[SIGNALS_SERIES_NAME].Points.DataBindY(Content.TrainingSignals.Concat(Content.TestSignals).ToArray());
    6568        this.chart.Series[SIGNALS_SERIES_NAME].Tag = Content;
     69        this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Secondary;
    6670
    67         IEnumerable<double> accumulatedPrice = GetAccumulatedPrices(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable));
     71        IEnumerable<double> accumulatedPrice = GetAccumulatedProfits(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable));
    6872        this.chart.Series.Add(PRICEVARIABLE_SERIES_NAME);
    6973        this.chart.Series[PRICEVARIABLE_SERIES_NAME].LegendText = PRICEVARIABLE_SERIES_NAME;
     
    7175        this.chart.Series[PRICEVARIABLE_SERIES_NAME].Points.DataBindY(accumulatedPrice.ToArray());
    7276        this.chart.Series[PRICEVARIABLE_SERIES_NAME].Tag = Content;
     77        this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Primary;
    7378
    74         IEnumerable<double> profit = OnlineProfitCalculator.GetProfits(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable), Content.Signals, Content.ProblemData.TransactionCosts);
    75         IEnumerable<double> accumulatedProfits = GetAccumulatedPrices(profit);
     79
     80        IEnumerable<double> trainingProfit = OnlineProfitCalculator.GetProfits(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, trainingRows), Content.TrainingSignals, Content.ProblemData.TransactionCosts);
     81        IEnumerable<double> testProfit = OnlineProfitCalculator.GetProfits(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, testRows), Content.TestSignals, Content.ProblemData.TransactionCosts);
     82        IEnumerable<double> accTrainingProfit = GetAccumulatedProfits(trainingProfit);
     83        IEnumerable<double> accTestProfit = GetAccumulatedProfits(testProfit);
    7684        this.chart.Series.Add(ASSET_SERIES_NAME);
    7785        this.chart.Series[ASSET_SERIES_NAME].LegendText = ASSET_SERIES_NAME;
    7886        this.chart.Series[ASSET_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    79         this.chart.Series[ASSET_SERIES_NAME].Points.DataBindY(accumulatedProfits.ToArray());
     87        this.chart.Series[ASSET_SERIES_NAME].Points.DataBindY(accTrainingProfit.Concat(accTestProfit).ToArray());
    8088        this.chart.Series[ASSET_SERIES_NAME].Tag = Content;
     89        this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Primary;
    8190
    8291        this.UpdateStripLines();
     
    8493    }
    8594
    86     private IEnumerable<double> GetAccumulatedPrices(IEnumerable<double> xs) {
     95    private IEnumerable<double> GetAccumulatedProfits(IEnumerable<double> xs) {
    8796      double sum = 0;
    8897      foreach (var x in xs) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionView.Designer.cs

    r9796 r9992  
    5858      // itemsGroupBox
    5959      //
    60       this.itemsGroupBox.Text = "Regression Solution";
     60      this.itemsGroupBox.Text = "Trading Solution";
    6161      //
    6262      // addButton
     
    7272      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7373      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    74       this.Name = "RegressionSolutionView";
     74      this.Name = "TradingSolutionView";
    7575      this.splitContainer.Panel1.ResumeLayout(false);
    7676      this.splitContainer.Panel2.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionView.cs

    r9928 r9992  
    2626
    2727namespace HeuristicLab.Problems.DataAnalysis.Trading.Views {
    28   [View("TradingSolution View")]
     28  [View("Trading Solution View")]
    2929  [Content(typeof(Solution), true)]
    3030  public partial class SolutionView : DataAnalysisSolutionView {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Plugin.cs.frame

    r9965 r9992  
    3838  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
    3939  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
     40  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
    4041  public class Plugin : PluginBase {
    4142  }
Note: See TracChangeset for help on using the changeset viewer.