Created
May 7, 2017 00:27
-
-
Save caseyWebb/710fd55b62afe8ace382dadb24db4fa9 to your computer and use it in GitHub Desktop.
trading-parameters.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Persistable from './_persistable' | |
type Exchange = | |
'coinbase' | | |
'hitbtc' | |
type CurrencySymbol = | |
'USD' | | |
'BTC' | | |
'ETH' | | |
'LTC' | |
type TradingPair = [CurrencySymbol, CurrencySymbol] | |
type TradingParametersData = { | |
[key: string] : any | |
exchange : Exchange | |
pair : TradingPair | |
// quotingStrategy : QuotingEngine.Strategy | |
// fvStrategy : FairValueEngine.Strategy | |
width : number | |
askSize : number | |
bidSize : number | |
carpeDiem : boolean | |
useMaxAsk : boolean | |
useMaxBid : boolean | |
usePercentages : boolean | |
// ping-pong strategies | |
// pingAt : QuotingEngine.PingAt | |
// pongAt : QuotingEngine.PongAt | |
widthPing : number | |
// ak-47 strategy only | |
bullets : number | |
range : number | |
// position management | |
usePositionManagement : boolean | |
positionManagementAggression : number | |
positionManagementDynamicAggression : boolean | |
// positionManagementPositioningStrategy : PositionManagement.TargetStrategy | |
// positionManagementRebalancingStrategy : PositionManagement.RebalancingStrategy | |
// target base position positioning strategy | |
positionManagementTargetBasePosition : number | |
positionManagementMaxDelta : number | |
// ewmabasic positioning strategy | |
positionManagementShortEwma : number | |
positionManagementLongEwma : number | |
// prevent buying | |
useSwingMitigation : boolean | |
// swingMitigationStrategy : PositionManagement.RebalancingStrategy | |
swingMitigationMaxOneSidedTrades : number | |
swingMitigationIntervalDuration : number | |
} | |
export default class TradingParameters extends Persistable<TradingParametersData> { | |
[key: string]: any | |
static $collectionName : string = 'trading-parameters' | |
data: TradingParametersData = { | |
exchange: 'coinbase', | |
pair: ['BTC', 'USD'], | |
// quotingStrategy: QuotingEngine.Strategies.Join, | |
// fvStrategy: FairValueEngine.Strategies.BBO, | |
width: .3, | |
askSize: .1, | |
bidSize: .1, | |
carpeDiem: true, | |
useMaxAsk: false, | |
useMaxBid: false, | |
usePercentages: false, | |
// ping-pong strategies | |
// pingAt: QuotingEngine.PingAts.BothSides, | |
// pongAt: QuotingEngine.PongAts.ShortPingFair, | |
widthPing: .3, | |
// ak-47 strategy only | |
bullets: 3, | |
range: .3, | |
// position management | |
usePositionManagement: false, | |
positionManagementAggression: 25, | |
positionManagementDynamicAggression: true, | |
// positionManagementPositioningStrategy: PositionManagement.TargetStrategies.TBP, | |
// positionManagementRebalancingStrategy: PositionManagement.RebalancingStrategies.Stop, | |
// target base position positioning strategy | |
positionManagementTargetBasePosition: 1, | |
positionManagementMaxDelta: .5, | |
// ewmabasic positioning strategy | |
positionManagementShortEwma: 100, | |
positionManagementLongEwma: 200, | |
// prevent buying | |
useSwingMitigation: true, | |
// swingMitigationStrategy: PositionManagement.RebalancingStrategies.Stop, | |
swingMitigationMaxOneSidedTrades: 5, | |
swingMitigationIntervalDuration: 60 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment