Q:

Which model to use for survival analysis when there are different times of entry into the sample?

I have a data set containing the trades executed by many traders as follows:
ID       Buy(1)/Sell(0)    StartTime    EndTime      PnL
1              1               1           1          7
1              1               2           3          5
1              0               2           5          6
1              1               3           5         -4
2              1               1           3          8
2              0               2           2         -9
2              0               3           5          3

where ID is the trader's identification number, Buy(1)/Sell(0) indicates whether the trade was a buy or sell, for simplicity StartTime and EndTime are the day on which the trade was opened and closed, and PnL is the profit or loss from that trade.
My goal here is to study whether a trader closes his position earlier (i.e. duration of a trade) based on whether he has made a gain or a loss. 
I am very new to the concept of hazard models. I understand the main idea behind them, but I am not sure what is the correct model to apply in my case where I have several traders, each with multiple trades that have different entry times (StartTime).
I would greatly appreciate any help you can provide me, with as much detail as possible.
UPDATE: How would the model specification differ if the transactions in my data are considered to be correlated? I am using R.
Thank you.

A:

I would have modelled this as a plain Cox model, or perhaps a Cox Frailty model.

You do not need to worry about the timing of entry into your study when using Cox regression (unless there is time bias, which I do not notice in your description).
You don't need the extended Cox model with start and stop intervals, just calculate the observation time (EndTime - StartTime) and enter it into Surv(observation_time, event).
You should account for the repeated measurements on the same individual by either using: (i) mixed effects cox models, (ii) the cluster function in coxph.

A:

The Cox Proportional Hazards model in R allows for late entry into the sample.
One can enter the parameters as follows:
cox.model <- coxph(Surv(startTime, endTime, event) ~ X + frailty(ID), data)

