Interest will only be charged on the margin loan (i.e. any outstanding amount on or after trade settlement day (e.g. settlement-day for Hong Kong market is T+2, i.e. 2 days after "trade date")). The loan interest is calculated on the "due" balance on a daily basis.
[Example 1] Buy stock on margin and take profits one week later,
need to pay interests for 7 days.
You have HKD 24,000 of cash in your margin account. You borrow HKD 36,000 to buy HKD 60,000 of Stock Y (Hong Kong stock) on April 1, 2013 (Friday) and sell it to take profit on April 8, 2013 (Friday). BOOM will start to calculate the margin loan interest on the settlement day of the buy trade, i.e. April 5, 2013 (Tuesday), until the settlement day of the sell trade, i.e. April 12, 2013 (Tuesday).
[Example 2] Buy stock on margin and repay the loan on the settlement day,
NO need to pay interests.
You have HKD 50,000 of cash in your margin account. You borrow HKD 20,000 to buy HKD 70,000 of Stock Z (Hong Kong stock) on April 1, 2013 (Friday) and then deposit HKD 20,000 of cash into your account on the settlement day of the buy trade, i.e. April 5, 2013 (Tuesday). As there is no outstanding loan at the end of the settlement day, no interest will be charged from your account.