  We study a an optimal high frequency trading problem within a market
microstructure model designed to be a good compromise between accuracy and
tractability. The stock price is driven by a Markov Renewal Process (MRP),
while market orders arrive in the limit order book via a point process
correlated with the stock price itself. In this framework, we can reproduce the
adverse selection risk, appearing in two different forms: the usual one due to
big market orders impacting the stock price and penalizing the agent, and the
weak one due to small market orders and reducing the probability of a
profitable execution. We solve the market making problem by stochastic control
techniques in this semi-Markov model. In the no risk-aversion case, we provide
explicit formula for the optimal controls and characterize the value function
as a simple linear PDE. In the general case, we derive the optimal controls and
the value function in terms of the previous result, and illustrate how the risk
aversion influences the trader strategy and her expected gain. Finally, by
using a perturbation method, approximate optimal controls for small risk
aversions are explicitly computed in terms of two simple PDE's, reducing
drastically the computational cost and enlightening the financial
interpretation of the results.
