A Java developer in financial IT industry. Hope to make friends with all of you.

Dec
27
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
Many thanks for your best-practice for BigDecimal.
Dec
6
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
Since I can only accept one answer, many thanks for all of you.
Dec
6
accepted Can we use double to store monetary fields and use BigDecimal for arithmetic
Dec
6
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
@Peter, many thanks for your comments. Yes, I saw lots of trading system are using double to represent price, quantity, and even amount´╝î but using BigDecimal to take care of the arithmetic. The only benefit for this I can see is saving some space. Is there any convention for this kind of usage in trading system?
Dec
6
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
Then the only purpose to use long is performance? Can I come to a conclusion: always use BigDecimal to represent monetary fields, try to use long if there is any performance issue? Is it acceptable to use double in high frequency trading after all double is quicker many times than BigDecimal?
Dec
6
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
Many thanks. Then which one is your suggestion? 1. Use BigDecimal for all fields. 2. Use long to represent these fields.
Dec
6
comment Can we use double to store monetary fields and use BigDecimal for arithmetic
Since this is not a simple monetary application which only deals with cents. There may be some price/amount that we need to keep at least 5 decimal points.
Dec
6
asked Can we use double to store monetary fields and use BigDecimal for arithmetic
Mar
8
answered Subscribing to Multiple Topics in JMS
Dec
10
accepted What's the difference between "bind to variables" and "bind to object" in Python
Dec
10
comment What's the difference between "bind to variables" and "bind to object" in Python
I think the answers from both unutbu and Jim Dennis hit the point. But I, in my humble opinion, feel that Jim's answer explains the dynamic characteristic of Python more clearly. Then I choose Jim's answer.
Dec
10
comment What's the difference between "bind to variables" and "bind to object" in Python
@unutbu: Many thanks for your detail explanation, it's really helpful. You give comments step by step, much appreciate!
Dec
10
comment What's the difference between "bind to variables" and "bind to object" in Python
Many thanks for your answer, the idea of watching the timing is very innovative.
Dec
9
comment What's the difference between "bind to variables" and "bind to object" in Python
The original post is: bytes.com/topic/python/answers/…
Dec
9
asked What's the difference between "bind to variables" and "bind to object" in Python
Nov
26
comment What's the relationship between numbers.Integral and int in builtins module in Python 3
There is a line in numbers.py: Integral.register(int), then int is a subclass of Integral.
Nov
26
accepted What's the relationship between numbers.Integral and int in builtins module in Python 3
Nov
26
comment What's the relationship between numbers.Integral and int in builtins module in Python 3
"The only builtin type that implements this interface is int. " It should be int and bool.
Nov
26
comment What's the relationship between numbers.Integral and int in builtins module in Python 3
Many thanks for your advice. Since I am a experienced programmer, I think I can handle this.
Nov
26
comment What's the relationship between numbers.Integral and int in builtins module in Python 3
Then can I regard int as the implementation of numbers.Integral since the latter is an interface? How and where can I verify such a relationship? Many thanks.
1 2 3 4