I’ve defined a currency pair as
struct ccy_pair;
c1::Symbol
c2::Symbol
end
ccy_pair(x::String) = ccy_pair(Symbol(x[1:3]),Symbol(x[end-2:end]))
macro p_str(x) ccy_pair(x) end
So I can write as ccy_pair( :AUD, :USD )
or p"AUD/USD"
.
Is it possible to write it any more briefly?
AUD/USD
would be ideal but I don’t think this is possible.