Skip to content

Commit 325770e

Browse files
Refactor portfolio state sampling and storing
1 parent 0a90ab8 commit 325770e

22 files changed

+373
-509
lines changed

Algorithm.Framework/Alphas/AlphaStreamAlphaModule.cs

Lines changed: 0 additions & 120 deletions
This file was deleted.

Common/ChartJsonConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
6161
writer.WritePropertyName("Series");
6262
writer.WriteStartObject();
6363
// we sort the series in ascending count so that they are chart nicely, has value for stacked area series so they're continuous
64-
foreach (var kvp in chart.Series.OrderBy(x => x.Value.Values.Count).ThenBy(x => x.Value.Values.Select(x => (x as ChartPoint)?.Y ?? 0).Sum()))
64+
foreach (var kvp in chart.Series.OrderBy(x => x.Value.Index)
65+
.ThenBy(x => x.Value.Values.Count)
66+
.ThenBy(x => x.Value.Values.Select(x => (x as ChartPoint)?.Y ?? 0).Sum()))
6567
{
6668
writer.WritePropertyName(kvp.Key);
6769
serializer.Serialize(writer, kvp.Value);

Common/Data/BaseData.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using QuantConnect.Util;
2323
using QuantConnect.Data.Market;
2424
using System.Collections.Generic;
25-
using QuantConnect.Data.Custom;
2625

2726
namespace QuantConnect.Data
2827
{
@@ -36,7 +35,6 @@ namespace QuantConnect.Data
3635
[ProtoInclude(200, typeof(QuoteBar))]
3736
[ProtoInclude(300, typeof(Dividend))]
3837
[ProtoInclude(400, typeof(Split))]
39-
[ProtoInclude(555, typeof(PortfolioState))]
4038
public abstract class BaseData : IBaseData
4139
{
4240
private decimal _value;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3+
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
using System;
17+
18+
namespace QuantConnect.Data.Custom.AlphaStreams
19+
{
20+
[Obsolete("'QuantConnect.Data.Custom.Alphas' namespace is obsolete")]
21+
public static class PlaceHolder
22+
{
23+
}
24+
}

0 commit comments

Comments
 (0)