Skip to main content

All Questions

Tagged with
7 votes
1 answer
251 views

Thread-safe algorithm to make trades based on moving window of prices

Here is problem to be solved TradingAlgorithm employs a trading algorithm which, based on the prices it receives, will return a trade to execute. The trading algorithm must implement the ...
sam's user avatar
  • 73
5 votes
2 answers
205 views

Compute correlation (3 types) of stock ticker

I'm developing a web application allowing a logged-in user to find most correlated stocks for selected stock ticker. The user chooses a ticker, period of time (10, 30, 60, 90) and type of correlation (...
Pulkownik's user avatar
  • 317
3 votes
1 answer
8k views

Concurrency Bank exercise with multiple accounts

I am doing an exercise in Java concurrency. The problem statement is as follows: Bank holds an array of Accounts. Client do (in a loop) the following operations: (1) work, then sleep for random ...
syntagma's user avatar
  • 231
3 votes
2 answers
98 views

Removing synchronization from an agent for a trading system

Is there any way to easily remove synchronization from this code, when there is a validation step before acquiring a lock? I tried an ...
Wojtek's user avatar
  • 191
1 vote
2 answers
2k views

ATM problem using collections

Problem statement: Write a CashWithDrawal function from an ATM which, based on user specified amount, dispenses bank notes. Ensure that the following is ...
mehta's user avatar
  • 111
5 votes
2 answers
28k views

Cash-withdrawal from an ATM

I'm seeking review comments (design, performance, etc.) based on the problem statement: Write a CashWithDrawal function from an ATM which based on user specified amount dispenses bank notes. ...
JavaGreenhorn's user avatar