Predicting high frequency finance time series with HMM I have a the following time series 
  Price      BrokerID 632 Behaviour  BrokerID 680 Behaviour ...BrokerID XYZ Behaviour

  5.6          IP                       SP                   
  5.7          BP                       IP
  5.8          SP                       BP
  5.83         IP                       SP

where IP is idle position, BP is buying position, and SP is selling position. I want to use Broker behaviour as the known variable and price as the hidden variable and predict it using HMM. But my question is how to find the emission matrix between a character vector (broker behaviour) and price numeric vector? 
 A: I'm not familiar with the financial time series data, but with my understanding of HMMs / graphical models, they are not models in which you get to choose the hidden variables. The hidden variables are interpreted as a "state", or some latent data-generation scheme, such that several states, each state with a different emission distribution, are responsible for the generation of the observed data. If it is a general mixture model without the HMM chain structure, then there's no temporal dependence of the model. HMM is proposed to incorporate temporal dependence of the data. In which case, the next "state" of the stock market depend on the current "state" of the stock market.
In your case, you have observed broker behavior (variable $B$, possibly from multiple brokers), and price (variable $P$), and you want to predict $P$ from $B$. 
If we do not consider temporal dependence of the stock market, we can just use any regression methods, or conditional graphical models (e.g. conditional random field) to predict $P$.
Given we want to consider temporal dependence as well, in the HMM setting, you can treat $B$ as a set of covariates for your emission distribution. That is, $B$ is a set of conditional variables which $P$ is conditioned upon. So, for each hidden state in the HMM, we want to learn a distribution of $P$ conditioned upon $B$.
Therefore, back to your question, probably what you wanted is an HMM, with:


*

*$M$, a fixed hidden number of states (decided by you).

*$T$, a transition matrix between the states (result of learning procedure of HMM).

*$A$ the initial distribution of hidden states (result of learning procedure of HMM).

*$E$, the emission distribution, one for each hidden state, where each distribution is a conditional distribution $p(P|B)$. 


Here, the conditional distribution $p$ can be as complicated as a conditional random field, or, a simple one such as a Gaussian mixture model, where the number of mixtures are the number of possible broker behaviors, the mixture coefficients are the portion of each broker behavior observed in that time, and the $\mu_i$ and $\sigma_i$ for each mixture is estimated using MLE for Gaussian distribution (in the M-step of the EM algorithm, for example.)  
However, given the fact that research of modeling spatial-temporal dependent time-series data using HMM is still an open field, starting with a simple regression model (e.g. linear regression) is more practical.
EDIT: Thanks for the comment by @while, I somehow misinterpreted the intention of @rup-mitra by saying that he wants to "predict" the price. I agree with @while that there are a variety of continuous state-space hidden Markov models. Broadly speaking, Kalman filters, observable operator models, reduced-rank hidden Markov models, etc. Theoretically, there could be an HMM that uses the "price" as the hidden state and generate multiple "broker behaviors", but I doubt that a single real number "price" contains enough information. Thus I proposed the above models as alternatives.
A: You need to use the Baum-Welch algorithm to learn the transition, emission and prior probabilities from your data. 
If you are using the HiddenMarkov CRAN package, you can achieve this by using the BaumWelch() function.
