/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System.Collections.Generic;
namespace QuantConnect.Securities.Positions
{
///
/// Specifies the impact on buying power from changing security holdings that affects current ,
/// including the current reserved buying power, without the change, and a contemplate reserved buying power, which takes
/// into account a contemplated change to the algorithm's positions that impacts current position groups.
///
public class ReservedBuyingPowerImpact
{
///
/// Gets the current reserved buying power for the impacted groups
///
public decimal Current { get; }
///
/// Gets the reserved buying power for groups resolved after applying a contemplated change to the impacted groups
///
public decimal Contemplated { get; }
///
/// Gets the change in reserved buying power, minus
///
public decimal Delta { get; }
///
/// Gets the impacted groups used as the basis for these reserved buying power numbers
///
public IReadOnlyCollection ImpactedGroups { get; }
///
/// Gets the position changes being contemplated
///
public IReadOnlyCollection ContemplatedChanges { get; }
///
/// Gets the newly resolved groups resulting from applying the contemplated changes to the impacted groups
///
public IReadOnlyCollection ContemplatedGroups { get; }
///
/// Initializes a new instance of the class
///
/// The current reserved buying power for impacted groups
/// The reserved buying power for impacted groups after applying the contemplated changes
/// The groups impacted by the contemplated changes
/// The position changes being contemplated
/// The groups resulting from applying the contemplated changes
public ReservedBuyingPowerImpact(
decimal current,
decimal contemplated,
IReadOnlyCollection impactedGroups,
IReadOnlyCollection contemplatedChanges,
IReadOnlyCollection contemplatedGroups
)
{
Current = current;
Contemplated = contemplated;
Delta = Contemplated - Current;
ImpactedGroups = impactedGroups;
ContemplatedGroups = contemplatedGroups;
ContemplatedChanges = contemplatedChanges;
}
}
}