Lean  $LEAN_TAG$
IShortableProvider.cs
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 
19 {
20  /// <summary>
21  /// Defines a short list/easy-to-borrow provider
22  /// </summary>
23  public interface IShortableProvider
24  {
25  /// <summary>
26  /// Gets interest rate charged on borrowed shares for a given asset.
27  /// </summary>
28  /// <param name="symbol">Symbol to lookup fee rate</param>
29  /// <param name="localTime">Time of the algorithm</param>
30  /// <returns>Fee rate. Zero if the data for the brokerage/date does not exist.</returns>
31  decimal FeeRate(Symbol symbol, DateTime localTime);
32 
33  /// <summary>
34  /// Gets the Fed funds or other currency-relevant benchmark rate minus the interest rate charged on borrowed shares for a given asset.
35  /// Interest rate - borrow fee rate = borrow rebate rate: 5.32% - 0.25% = 5.07%
36  /// </summary>
37  /// <param name="symbol">Symbol to lookup rebate rate</param>
38  /// <param name="localTime">Time of the algorithm</param>
39  /// <returns>Rebate fee. Zero if the data for the brokerage/date does not exist.</returns>
40  decimal RebateRate(Symbol symbol, DateTime localTime);
41 
42  /// <summary>
43  /// Gets the quantity shortable for a <see cref="Symbol"/>.
44  /// </summary>
45  /// <param name="symbol">Symbol to check shortable quantity</param>
46  /// <param name="localTime">Local time of the algorithm</param>
47  /// <returns>The quantity shortable for the given Symbol as a positive number. Null if the Symbol is shortable without restrictions.</returns>
48  long? ShortableQuantity(Symbol symbol, DateTime localTime);
49  }
50 }