Skip to content

Commit be3f397

Browse files
committed
minor fixes
1 parent 871972f commit be3f397

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/account.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Determines if the account has non-zero exposure to the given instrument
132132
in the given direction (`Buy`, `Sell`).
133133
"""
134134
@inline function is_exposed_to(acc::Account, inst::Instrument, dir::TradeDir.T)
135-
trade_dir(get_position(acc, inst)) == sign(dir)
135+
sign(trade_dir(get_position(acc, inst))) == sign(dir)
136136
end
137137

138138
"""

src/collectors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mutable struct MinValue{T}
7878
end
7979

8080
function min_value_collector(::Type{T}) where {T}
81-
mv = MinValue{T}(DateTime(0), 1e50)
81+
mv = MinValue{T}(DateTime(0), typemax(T))
8282

8383
@inline function collector(dt::DateTime, value::T)
8484
if value < mv.min_value

src/exchange_rates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Supports spot exchange rates between assets.
3030
"""
3131
mutable struct SpotExchangeRates{CData} <: ExchangeRates{CData}
3232
const rates::Vector{Vector{Float64}} # rates[from][to] using internal index
33-
const indices::Dict{Cash{CData},UInt} # cash object -> index
33+
const indices::Dict{Cash{CData},Int} # cash object -> index
3434
const assets::Vector{Cash{CData}}
3535

3636
function SpotExchangeRates(

0 commit comments

Comments
 (0)